B
Bill
Hi,
Can someone point out to me what I have wrong with this IF statement. No
matter what I change or where I place commas I still get a Syntax Error. I
have a Form with one text box for an input number and a command button to run
my query. I want to put in this IF statement in the query. It is suppose to
do this. When a number is put into the text box the query checks for match in
the dwFirstNumber field. If there is not any then to look in the
dwSecondNumber field and then the dwThirdNumber for matches. This is what I
entered on the criteria line of my query:
If(([Forms]![tblBoxed_Form]![Text0] = “dwFirstNumberâ€) then (“dwFirstNumberâ€))
Else
([Forms]![tblBoxed_Form]![Text0] = “dwSecondNumberâ€)
Else
([Forms]![tblBoxed_Form]![Text0] = “dwThirdNumberâ€)
Else
([Forms]![tblBoxed_Form]![Text0] = “â€) “Number Not Pickedâ€
End If
Just what I am I doing wrong? And what can I do to fix it. I want to thank
anyone who helps me out. I am just learning so I have to feel my way around
and ask some simple questions I should know.
Thanks,
Bill
Can someone point out to me what I have wrong with this IF statement. No
matter what I change or where I place commas I still get a Syntax Error. I
have a Form with one text box for an input number and a command button to run
my query. I want to put in this IF statement in the query. It is suppose to
do this. When a number is put into the text box the query checks for match in
the dwFirstNumber field. If there is not any then to look in the
dwSecondNumber field and then the dwThirdNumber for matches. This is what I
entered on the criteria line of my query:
If(([Forms]![tblBoxed_Form]![Text0] = “dwFirstNumberâ€) then (“dwFirstNumberâ€))
Else
([Forms]![tblBoxed_Form]![Text0] = “dwSecondNumberâ€)
Else
([Forms]![tblBoxed_Form]![Text0] = “dwThirdNumberâ€)
Else
([Forms]![tblBoxed_Form]![Text0] = “â€) “Number Not Pickedâ€
End If
Just what I am I doing wrong? And what can I do to fix it. I want to thank
anyone who helps me out. I am just learning so I have to feel my way around
and ask some simple questions I should know.
Thanks,
Bill