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

Query Multiple Criteria "All" or 1?

P: n/a
Hello All,

In the past I've used a combo box with the 'row source' being an Access SQL
union query to select "All" or 1 for only 1 criteria in a query. An example
is as follows:

SELECT 0 As PvdrID, "All" As PvdrDesc FROM tblPrvdr UNION SELECT PvdrID,
PvdrDesc FROM tblPrvdr ORDER BY PvdrID;

In the query I would place a field which wasn't selected for display which was
basically the combo box value selected (ie.
"[Forms]![frmRptDates]![cmbPrvdr]"). I would then have 2 lines of criteria in
the query grid. The 1st was for the "PvdrID" field in the query with the
criteria being "[Forms]![frmRptDates]![cmbPrvdr]". The 2nd criteria was for
"[Forms]![frmRptDates]![cmbPrvdr]" with the criteria being "0".

Field: PvdrID [Forms]![frmRptDates]![cmbPrvdr]
Crit: [Forms]![frmRptDates]![cmbPrvdr]

Now I want to use the same concept in another database only with multiple
fields / criteria. I can get it to work if all the combo box selections are
"All" or have something selected, but I can NOT get it to work when 1 has
"All" and the other has 1 option chosen. Under test I've been using only 2
fields, but would like to expand up to possibly 4 fields.

Any ideals? TIA!


Greg Strong

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.