Me.Command1111.Visible = CurrentUser = "username"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to add (2) more users to view this command. How do I add them? I
tried , ; "" and

Im stuck... Any help would be greatful
 
I need to add (2) more users to view this command. How do I add them? I
tried , ; "" and

Well.... if you need two, you'll someday need three; and WHICH users
will change from time to time, no?

The *direct* - and probably inadequate, for this reason! - answer is

Me.Command1111.Visible = (CurrentUser = "user1" OR CurrentUser =
"user2" OR CurrentUser = "user3")

A more flexible and easier to maintain answer is to create a small
(secured, perhaps not visible) table of authorized users, tblCanSee,
and use

Me.Command1111.Visible = Not IsNull(DLookUp("UserID", "tblCanSee", _
"[UserID] = '" & CurrentUser & "'")


John W. Vinson [MVP]
 

Ask a Question

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.

Ask a Question

Back
Top