MCaliebe
asked on
Applying a select query for a combo box with criteria from a form.
Good morning!
I have a combo box on a form which I am having problem with the selct query for the data.
Esentially, this combo box is a look up of the records currently available to the form. I use a radial button to apply a filter to the form and I ask for the combox box to requery after the filter is applied, however i can't seem to format the criteria statement correctly in the select query.
This is my criteria for my Employment Status field in the Select Query of the combo box.
IIf([Forms]![Employee Details]![RBtn_Show_Inacti ve]=False, "active",)
When the button is false (or filtered), only records with "active" are selected, however when I remove the filter, I want all records to show. Using the statement above, no records are selected.
I've also tried to format the False part of the IIF statement with options like "*", "Active" AND "Inactive", Not Null...nothing seems to return all the records. I can ask for another criteria such has "Inactive" and it will select those records so I know the IFF statement is correct.
What am I doing wrong?
I have a combo box on a form which I am having problem with the selct query for the data.
Esentially, this combo box is a look up of the records currently available to the form. I use a radial button to apply a filter to the form and I ask for the combox box to requery after the filter is applied, however i can't seem to format the criteria statement correctly in the select query.
This is my criteria for my Employment Status field in the Select Query of the combo box.
IIf([Forms]![Employee Details]![RBtn_Show_Inacti
When the button is false (or filtered), only records with "active" are selected, however when I remove the filter, I want all records to show. Using the statement above, no records are selected.
I've also tried to format the False part of the IIF statement with options like "*", "Active" AND "Inactive", Not Null...nothing seems to return all the records. I can ask for another criteria such has "Inactive" and it will select those records so I know the IFF statement is correct.
What am I doing wrong?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER