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

Return ALL records

P: 69
Hi there, am using Access 2002 and am wondering if there is a way to set up a query so that if I don't make a selection for a parameter such as a department code, I would see all records, and if I do make a selection, I would only see records pertaining to that particular Department Code I selected. Am not sure if Access can do this or not.

Thank you VERY MUCH for your assistance.

Feb 13 '08 #1
Share this Question
Share on Google+
3 Replies

P: 22
Yes you can do that, but not very clear about your question, are you trying to display it in a form??

if you are using a query then , make your form's record source as "select * from table", and if you want it selectively, you can use filter..
hope this helps...????
Feb 13 '08 #2

Expert 2.5K+
P: 2,653
Hi, KEscherich.

I guess so far your query looks like
Expand|Select|Wrap|Line Numbers
  1. ..... WHERE [SomeField]=[Parameter] ...
Change it to
Expand|Select|Wrap|Line Numbers
  1. ..... WHERE [SomeField]=[Parameter] OR IsNull([Parameter]) ...
Feb 13 '08 #3

Expert Mod 15k+
P: 31,492
You could try :
Expand|Select|Wrap|Line Numbers
  1. ..... WHERE [SomeField] LIKE [Parameter] & '*' ...
but this is really only for string fields.
Feb 17 '08 #4

Post your reply

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