P
Pendragon
I'm sure I've seen something in these threads but my searches are coming up
empty. Is there an IN or NOT IN statement, and if so, is it tied to an array?
Here's what I want to do - perform the same function(s) if the user is one
of five authorized; if not, everyone gets an "Access denied" message. What
is below could be way off, but hopefully you can interpret and correct.
Dim A as variant
Dim Empl as string
Empl = CurrentUser()
A = Array("John","Jane","Mary","Bob","Bill")
IF Empl Not in A THEN
msgbox "Access Denied." etc etc
ELSE
DoCmd.OpenForm etc etc
END IF
Just thought there was something quicker/more efficient than typing out the
same function to perform for the five individuals using IF/ELSEIF statements
or a SELECT CASE statement.
Thanks!
empty. Is there an IN or NOT IN statement, and if so, is it tied to an array?
Here's what I want to do - perform the same function(s) if the user is one
of five authorized; if not, everyone gets an "Access denied" message. What
is below could be way off, but hopefully you can interpret and correct.
Dim A as variant
Dim Empl as string
Empl = CurrentUser()
A = Array("John","Jane","Mary","Bob","Bill")
IF Empl Not in A THEN
msgbox "Access Denied." etc etc
ELSE
DoCmd.OpenForm etc etc
END IF
Just thought there was something quicker/more efficient than typing out the
same function to perform for the five individuals using IF/ELSEIF statements
or a SELECT CASE statement.
Thanks!