Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two Form Results as Criteria

Status
Not open for further replies.

jwruble

Programmer
May 29, 2002
16
0
0
US
I have created reports that get their data from a query. The query gets two requirements (criteria) from a form consisting of two list boxes. So the user selects their desired output from the two pull-down boxes. That part works fine, but I would like for the user to be able to leave the boxes blank, resulting in a much more broad report.

Using "Is Null" statements, I got the process to work when both boxes are left blank. However, if one is blank and the other is specified, the query (or report) returns blank results (error).

Does anybody have any info on this sort of thing?
 
Hi,

I've had this from some time ago at work - I'm at home.
I think it's the usual Access foible with checking nulls, (works fine with Visual Basic, doesn't with VBA).

Hopefully, some wiz will know this from experience and post the answer quicker than me, but, where are you checking for the contents of the pull-downs?

If the query is picking them up from the form, then please post the SQL code for the query.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top