Syntax for a Parameter Query with extra bits required?

L

Legacy 154275

Guest
Hi all :)

I have to create a Para query to list all pets born in a particular year, thats easy I think [Enter the Year of Birth] in criteria, so thats all good it askes me for a year, and wham NOTHING returned :(

What am I doing wrong please?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
you're comparing as such: [Enter the Year of Birth] = Year([DOB])
Yes?

Hi mate and tx but no go :(

I have to use a Parameter search so I need a question dialog box to appear, and it has to search on the Year in the PetDOB Table which has 01/01/1999 etc in it.

The above gets me the question dialog box, but zip in results.

Is that understandable?
 
Upvote 0
Yes, however I can't force the same result on Access 2007.
You might try wrapping them both in CInt
i.e. CInt( [Enter the Year of Birth] ) = CInt( [DOBField] )
 
Upvote 0
Hi again mate and thank you!!

Just reveresed your first one Year([PetDOB])=[Enter Year] Works a treat as well :)

I do not know why this one works and your first one did not?

I may well be back with more LOL
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top