Query Conditional Criteria (1 Viewer)

ccflyer

Registered User.
Local time
Yesterday, 20:01
Joined
Aug 12, 2005
Messages
90
Hi guys,

I have a form with an option group. It has 2 options. The first one has a value of 1, the second has a value of 2. This option group is named "category".

Separate from this I have a query with several fields. In one of these fields, I need to enter a criteria that enters "LOE*" if the option group value is 1, or if the value is 2, I need it to enter "IDC*" in the criteria. My form that the option group is on is named "SelectWell". This is what I have tried so far:

Code:
Like IIf([Forms]![SelectWell]![category]=1,"LOE *","IDC*")

This works correctly if the option group value is 2, but doesn't work for the 1 value (LOE*).

Thanks,
Chris
 

ccflyer

Registered User.
Local time
Yesterday, 20:01
Joined
Aug 12, 2005
Messages
90
Wow, I totally missed that. It works once that is changed. Thanks for pointing that out neileg!

-Chris
 

Users who are viewing this thread

Top Bottom