Newbie query question

TheB

Registered User.
Local time
Today, 16:21
Joined
Mar 17, 2003
Messages
25
I have a query for which I use to produce a report. All my form fields can be populated to filter data in the report. Problem I am having is user can select only one field for which they enter specific data and the rest would not. How do I set up my Criteria in the query such that if they want all records (do not require specific data to put in the form field). Hope I am explaining well. I just need to know how to define in the query that want all records rather than a specific record.

Look forward to your reply and thanks in advance. Again, if not clear please let me know and I will explain further.

...The B
 
In the Design View of the query for the report, try this setting in a column in the query grid, using one column for one of the fields that need to filter data (replacing with the correct form name and text box name, and the correct field name):-


Field: IIF(IsNull([Forms]![formName]![textboxName]), True, [fieldName]=[Forms]![formName]![textboxName])

Show: uncheck
Criteria: <>False


Note. The word True in the expression will return every record when nothing is entered in the test box on the form.
 
Last edited:
One more question

Jon,

Thanks for your help. However, I am confused on your selections for the "Show" and "Criteria" options. Can you elaborate as to why you would uncheck the Show option? Also how and why would I set the Criteria to false. Forgive my ignoraance here but I am quite new to the Access game.

...TheB
 

Users who are viewing this thread

Back
Top Bottom