IIF Statement

M

Mal

How can I get this to work right. I am stumped.
Example: IIF(Me!.Total =1,Call form 1, DO NOTHING)
 
M

Marshall Barton

Mal said:
How can I get this to work right. I am stumped.
Example: IIF(Me!.Total =1,Call form 1, DO NOTHING)


IIf is a function that returns a value, so it can not be
used this way. OTOH, it looks like you are probably trying
to do this in an event procedure using VBA code.

If so, then you should be using the IF statement:

If Me.Total =1 Then
DoCMD.OpenForm "form 1"
End If
 
Top