Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a Page Invisible based on User/Group 1

Status
Not open for further replies.

iamedwardkim

IS-IT--Management
Joined
Nov 7, 2002
Messages
29
Location
US
Is there a way to set a "Page" on a form invisible based on the User that is logged on? or the group the user is a member of?
 
Sure, but when you are referring to page to you really mean the page of the form or the page of a tab control? How do you navigate between your pages? Command buttons? Post back with this information and I can help you.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
The page of a tab control. Thanks~!
 
In the OnOpen event procedure of the Form put code to make the page invisible. Here is an example of the VBA code to do this:
If CurrentUser() = "Bob" Then
Me![SecurityInfo].Visible = False
End If

Post back with questions.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Thanks scriverb, works great~! Is there also a way to have a conditional statement based on group?
 
Yes, there is but I won't be able to post that one until sometime on Saturday.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Hi scriverb,

I could still use the assistance if you're still available.
 
You can get code to determine whether or not the user is in a specific group in the security faq. You can get that from microsoft or from my website.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Professional Development for Clients Large and Small

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Sorry about the delay in responding. Here is a link that should also help:


Post back with questions concerning this code if you have any.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top