Query pulling data from a Form

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a query that looks up the values of a form...when
you hit the submit button on the form, it loads the query
with the info from the unbound form. However, I would
like the query to skip an object if it is null and display
every result for that field..here are my specs:

form name=frmTest
query name=qryTest

Objects name=
cmbCustType
cmbStatus
cmbMail

The Query pulls the data from those objects. It works
great if I match each item up with the data from the
table..however, If I don't want to sort by cmbMail
(meaning I only want cmbCustType and cmbStatus queried
with all of cmbMail), then it shows nothing...help and
thanks!!

Dave
 
Dave said:
I have a query that looks up the values of a form...when
you hit the submit button on the form, it loads the query
with the info from the unbound form. However, I would
like the query to skip an object if it is null and display
every result for that field..here are my specs:

form name=frmTest
query name=qryTest

Objects name=
cmbCustType
cmbStatus
cmbMail

The Query pulls the data from those objects. It works
great if I match each item up with the data from the
table..however, If I don't want to sort by cmbMail
(meaning I only want cmbCustType and cmbStatus queried
with all of cmbMail), then it shows nothing...help and

Use a criteria like this for each control:

WHERE Forms!FormName!ControlName Is Null OR
(Orders.ShipCountry=Forms!FormName!ControlName AND
Forms!FormName!ControlName Is Not Null);
 
Back
Top