S
Stacy
So, I know this is probably a simple issue, but after banging my head
against the wall and reading almsot every newsgroup article I came
across, I still just can't seem to get this right.
I have a query that runs from a form.
I have set up criteria on the form so the users can select the exact
records they are looking for.
So, for example I have:
RegID
RegDescription
RegOwner
RegOwnerArea
Function
FunctionOwner
I have selected fields on the form (combo box).
Here's how it's supposed to work...
If RegOwner is selected, run query based on RegOwner criteria
selected...
If RegOwner is selected, and RegFunction is selected... run the query
based on both selections.
So, in the criteria field for all 5 fields, I have the following
statement:
Like IIf(Isnull([Forms]![FormName]![FormComboBoxFieldName]),"*",
[Forms]![FormName]![FormComboBoxFieldName]).
It works great when I tested it on the first field.
However, once I added that same criteria to the second field, it's not
giving me the correct records.
It only gives me the correct records if all combo boxes are selected.
Can anyone tell me what I am missing?
Thanks, it's very much appreciated!
Stacy
against the wall and reading almsot every newsgroup article I came
across, I still just can't seem to get this right.
I have a query that runs from a form.
I have set up criteria on the form so the users can select the exact
records they are looking for.
So, for example I have:
RegID
RegDescription
RegOwner
RegOwnerArea
Function
FunctionOwner
I have selected fields on the form (combo box).
Here's how it's supposed to work...
If RegOwner is selected, run query based on RegOwner criteria
selected...
If RegOwner is selected, and RegFunction is selected... run the query
based on both selections.
So, in the criteria field for all 5 fields, I have the following
statement:
Like IIf(Isnull([Forms]![FormName]![FormComboBoxFieldName]),"*",
[Forms]![FormName]![FormComboBoxFieldName]).
It works great when I tested it on the first field.
However, once I added that same criteria to the second field, it's not
giving me the correct records.
It only gives me the correct records if all combo boxes are selected.
Can anyone tell me what I am missing?
Thanks, it's very much appreciated!
Stacy