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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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,212,142
Messages
6,106,207
Members
448,005
Latest member
Valvictor

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