Criteria: Radio Buttons

B

briank

Hello. I am trying to use a form's radio button frame as criteria for my
query. When I run the query I am getting zero records. I've have hard coded
the criteria with "<>0" and ">0" and all works well which leads me to believe
that the problem is in the SQL. Also, the form is kept open for the
reference to work. I've tried some combinations of double & single quotes
but have not solved the riddle. Any comments on my verbage would be
appreciated.

IIf([Forms]![frmProductionMenu2]![Frame133]=1,<>0,IIf([Forms]![frmProductionMenu2]![Frame133]=2,>0,Null))
 
K

KARL DEWEY

Have you looked at what the form is passing to the query?

Add an output field like this --
MyFormData: [Forms]![frmProductionMenu2]![Frame133]
 
B

briank

Yes I have tried a few variations of the criteria - like substituting a
number in place of the preferred "<>0" and it works just fine. I am thinking
that using an incorrect format of "<>0" / ">0" as this appears to be the
problem. Any suggestions?

KARL DEWEY said:
Have you looked at what the form is passing to the query?

Add an output field like this --
MyFormData: [Forms]![frmProductionMenu2]![Frame133]

briank said:
Hello. I am trying to use a form's radio button frame as criteria for my
query. When I run the query I am getting zero records. I've have hard coded
the criteria with "<>0" and ">0" and all works well which leads me to believe
that the problem is in the SQL. Also, the form is kept open for the
reference to work. I've tried some combinations of double & single quotes
but have not solved the riddle. Any comments on my verbage would be
appreciated.

IIf([Forms]![frmProductionMenu2]![Frame133]=1,<>0,IIf([Forms]![frmProductionMenu2]![Frame133]=2,>0,Null))
 
Top