Jim Pockmire said:
I believe there is a way to use these functions in VBA, but I ca't remember
how to do it.
This will work,
somevar = IIF(avar = something, retvalfortrue, retvalforfalse)
but most think it easier to follow, later, if you use
If avar = something Then
somevar = retvalfortrue
Else
somevar = retvalforfalse
End If
or the alternative
IF avar = something Then somevar = retvalfortrue Else somevar =
retvalforfalse
FOR EACH varname IN arrayorgroup
is one valid use of IN in VBA. (Open the code window, type "In" in a module,
put the cursor on it, press F1, and that's the Help topic.)
Larry Linson
Microsoft Access MVP