Hi
I have a form that I want to use as an input device for a query request. The form has 4 fields.
cboUser (A combobox with the users name),
cboProv (A combobox populated with names from a table)
txtFrom (a textbox where the from-date is entered)
txtTo (a textbox where the to-date is entered)
Now to my question.
I want the user be able to enter something from the list in either both of the comboboxes or just one of them. The dates are populated when the form opens.
So this is what I want the query to do when I click on the button open query:
If the cboUser is Null then cboUser="*"
If the cboProv is Null then cboProv="*"
I am enclosing an image of the part of the query where I need to place the requests.
I suppose I should use the IIF is null, but I don't know how.
I have a form that I want to use as an input device for a query request. The form has 4 fields.
cboUser (A combobox with the users name),
cboProv (A combobox populated with names from a table)
txtFrom (a textbox where the from-date is entered)
txtTo (a textbox where the to-date is entered)
Now to my question.
I want the user be able to enter something from the list in either both of the comboboxes or just one of them. The dates are populated when the form opens.
So this is what I want the query to do when I click on the button open query:
If the cboUser is Null then cboUser="*"
If the cboProv is Null then cboProv="*"
I am enclosing an image of the part of the query where I need to place the requests.
I suppose I should use the IIF is null, but I don't know how.
Attachments
Last edited: