Qry values based on Cbo

J

Jason

I am trying to limit the data in my qry based on the values of a Combo box on
a form. The trick to it is that if the Combo is left blank I would like it to
return all records. Is this possible? I have tried the following but it does
not work, Any help is appreciated.

=IIf([Forms]![Frm_Clinical_EmployeeSelect]![Combo15]="","",=[Forms]![Frm_Clinical_EmployeeSelect]![Combo15])
 
J

Jason

That returns the data when the Cbo has data in it but does not return all
records when it is empty

KARL DEWEY said:
Try this ---
Like [Forms]![Frm_Clinical_EmployeeSelect]![Combo15] & "*"
--
KARL DEWEY
Build a little - Test a little


Jason said:
I am trying to limit the data in my qry based on the values of a Combo box on
a form. The trick to it is that if the Combo is left blank I would like it to
return all records. Is this possible? I have tried the following but it does
not work, Any help is appreciated.

=IIf([Forms]![Frm_Clinical_EmployeeSelect]![Combo15]="","",=[Forms]![Frm_Clinical_EmployeeSelect]![Combo15])
 
K

KARL DEWEY

Try this ---
[Forms]![Frm_Clinical_EmployeeSelect]![Combo15] Or
[Forms]![Frm_Clinical_EmployeeSelect]![Combo15] Is Null

--
KARL DEWEY
Build a little - Test a little


Jason said:
That returns the data when the Cbo has data in it but does not return all
records when it is empty

KARL DEWEY said:
Try this ---
Like [Forms]![Frm_Clinical_EmployeeSelect]![Combo15] & "*"
--
KARL DEWEY
Build a little - Test a little


Jason said:
I am trying to limit the data in my qry based on the values of a Combo box on
a form. The trick to it is that if the Combo is left blank I would like it to
return all records. Is this possible? I have tried the following but it does
not work, Any help is appreciated.

=IIf([Forms]![Frm_Clinical_EmployeeSelect]![Combo15]="","",=[Forms]![Frm_Clinical_EmployeeSelect]![Combo15])
 

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