J
justinschmidt
I have an autonumber field in a query that I want to put criteria on.
When a text box on a form has a value (say 1, 2, or 3), I want the
query to run with the autonumber criteria set to this value. When there
is no value in this text box, I want it to return all the records.
I'm trying to use this line
IIf(IsNull([Forms]![Main
Menu]![ProjectIDSet]),WHATGOESHERE,[Forms]![Main Menu]![ProjectIDSet])
I've tested this line, and it works perfect, except I can't figure out
what to use as the 'Value if True' item. I can't use something like Not
Null because it is an autonumber field. I tried using <>0 but that
didn't work. I can't imagine this being complicated, but I'm completely
stumped.
When a text box on a form has a value (say 1, 2, or 3), I want the
query to run with the autonumber criteria set to this value. When there
is no value in this text box, I want it to return all the records.
I'm trying to use this line
IIf(IsNull([Forms]![Main
Menu]![ProjectIDSet]),WHATGOESHERE,[Forms]![Main Menu]![ProjectIDSet])
I've tested this line, and it works perfect, except I can't figure out
what to use as the 'Value if True' item. I can't use something like Not
Null because it is an autonumber field. I tried using <>0 but that
didn't work. I can't imagine this being complicated, but I'm completely
stumped.