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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

tweedle

Well-known Member
Joined
Aug 1, 2010
Messages
1,559
you're comparing as such: [Enter the Year of Birth] = Year([DOB])
Yes?
 
L

Legacy 154275

Guest
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?
 

tweedle

Well-known Member
Joined
Aug 1, 2010
Messages
1,559
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] )
 
L

Legacy 154275

Guest
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,522
Messages
5,837,841
Members
430,518
Latest member
smithk901

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
Top