Criteria set through text box

Twin

Registered User.
Local time
Today, 00:07
Joined
May 19, 2000
Messages
26
Hi All and Merry Christmas,
I have a this subform that is based on the query;One filter is sourced on the combo box on the main form and it refreshes the subform after change. The other filter is on the column in the query that has two values, Y and N. I am trying to set the criteria through the text box in the way that will display me selected records based on the input from the text box but also display all of the records if the box is left blank. I have tried IIf([Forms]![MAIN]![Budgeted] Is Null,"Y" Or "N",[Forms]![MAIN]![Budgeted]).
IIf([Forms]![MAIN]![Budgeted] Is Null,"Y" And "N",[Forms]![MAIN]![Budgeted]),
IIf([Forms]![MAIN]![Budgeted] ="","Y" Or "N",[Forms]![MAIN]![Budgeted]).
Even when i place only "Y" And "N" in the criteria field it brings back empty result sheet.
I would appreciate any ideas you might have.
Once again best wishes for the comming Christmas and a Happy New Year.
Chris
 
Try:

Like "*" & [Forms]![MAIN]![Budgeted]& "*"

Should work.
Is it a Yes/No field - you may have to enter TRUE(Y) or FALSE(N) instead to get the correct results
 

Users who are viewing this thread

Back
Top Bottom