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
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.