Hi,
I have a form used to generate query output. The user selects criteria in a simple combobox on the form. It all works apart form the "other" selection.
I have a list of types of work - and one needs to be other - when selected I want the query to show everything "leftover". To make this work I have a hidden unbound text field which populates based on the combo box selection - so if you pick A B or C the unbound textbox says A B or C and this works fine in the query criteria. But if the user selects "D - Other" the unbound text box is set to null and I want everything except A B or C.
In the criteria for the appropriate field I have this ( I have taken out full form/form name references and renamed objects for clarity):
IIf(IsNull[txtUnboundDiplay])=True, "<> "A" and <> "B" and <> "C"", txtUnboundDiplay)
but it doesn't work. Can anyone help as I thought my logic was sound and I'm not sure what the problem is. Using <> "A" and <> "B" and <> "C" works fine on it's own as criteria.
Thanks in Advance
CB
I have a form used to generate query output. The user selects criteria in a simple combobox on the form. It all works apart form the "other" selection.
I have a list of types of work - and one needs to be other - when selected I want the query to show everything "leftover". To make this work I have a hidden unbound text field which populates based on the combo box selection - so if you pick A B or C the unbound textbox says A B or C and this works fine in the query criteria. But if the user selects "D - Other" the unbound text box is set to null and I want everything except A B or C.
In the criteria for the appropriate field I have this ( I have taken out full form/form name references and renamed objects for clarity):
IIf(IsNull[txtUnboundDiplay])=True, "<> "A" and <> "B" and <> "C"", txtUnboundDiplay)
but it doesn't work. Can anyone help as I thought my logic was sound and I'm not sure what the problem is. Using <> "A" and <> "B" and <> "C" works fine on it's own as criteria.
Thanks in Advance
CB