By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

Problem with passing parameters to a query

P: 1
Hi guys,

I'm using Access 2002 and need to pass a parameter to a select query that will either return ALL records (including NULL values) OR exclude NULL values only, on a particular field.

Put another way, I need to give the user the ability to set a particular field as follows:

Criteria: 'Is Not Null' (return all records where the field value exclude null)
OR
Criteria: (return all records including where the field value is null)

Any suggestions?

Thanks
Jul 23 '07 #1
Share this Question
Share on Google+
1 Reply


P: 65
Hi guys,

I'm using Access 2002 and need to pass a parameter to a select query that will either return ALL records (including NULL values) OR exclude NULL values only, on a particular field.

Put another way, I need to give the user the ability to set a particular field as follows:

Criteria: 'Is Not Null' (return all records where the field value exclude null)
OR
Criteria: (return all records including where the field value is null)

Any suggestions?

Thanks
Open the query in design view and in Criteria put the value1 and in Or put value2.

You may also try: SELECT tblNameAge.stName, tblNameAge.stAge
FROM tblNameAge
WHERE (((tblNameAge.stName)="mike")) OR (((tblNameAge.stAge)=18));
Jul 23 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.