criteria and null values

G

Guest

Hi there,

I have a form with four combo boxes on it. These combo boxes are used to
allow the user to build a query with the particular criteria they desire.

I want to capture the value selected as the criteria, or all values if no
value is selected. I used forms!frmBuildQuery!cboDomImp or
forms!frmBuildQuery!cboDomImp is null to accomplish this. This works well
for one combo box, however, I want to apply this principle to all three boxes
so that the user can choose what criteria he/she wants. How can I do this?
Simply doing the same thing to the next box doesn't work.

Problem:

In my record source query I have forms!frmBuildQuery!cboDomImp or
forms!frmBuildQuery!cboDomImp is null in the DomesticOrImport field. If I
add forms!frmBuildQuery!cboOrigin or forms!frmBuildQuery!cboOrigin is null
in the Origin field, I get no results.

What am I doing wrong?
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The correct criteria is:

WHERE Forms!frmBuildQuery!cboDomImp Is Null
OR (DomesticOrImport = Forms!frmBuildQuery!cboDomImp AND
Forms!frmBuildQuery!cboDomImp Is Not Null);

See this site for more info on that criteria:

http://support.microsoft.com/support/kb/articles/q103/1/81.asp

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQgmLTYechKqOuFEgEQIDeACeJTUhZPCvLSIWr9Lm3pgbjItk5CYAoK4J
40JTWKPqqGDSzT+Sh4cYeuhJ
=LXEx
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top