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

Query through form with or without data specified

P: n/a
Jim
Hi all... I'm really scratching my head over this one...

I have a form that pops up that has three criteria fields on it,
BeginDate, EndDate, and UserID. I want the person filling out the form
to enter a begin and end date for the report, and either leave the
UserID field blank (to specify the report is for all users) or to input
a 4 digit ID for the specific user they want to run the report for.
Pretty easy until I get to the User ID part... I don't know how to do
it.

The Date field has the criteria:
Between [Forms]![GetDatesIP]![BeginDate] And
[Forms]![GetDatesIP]![EndDate]

What would you put in the criteria for the ID field to specify that if
the UserID field is blank, run it for all, or if it has a value in it
(say "U400"), run it for that value?

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

P: n/a
Jim
[Forms]![myForm]![myControl] OR [Forms]![myForm]![myControl] Is Null

Works like a charm... thanks mate.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.