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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get access user info 1

Status
Not open for further replies.

danomaniac

Programmer
Jan 16, 2002
266
US
I am building a switchboard in a password protected access database. I would like to make some forms accessable to some users and not to others. Is there a way to determin who is logged in via VBA?

Thanks.

Dan

"It's more like it is now, than it ever has been."
 
If your using an MDW file for your Password, then you can get the current user by using this line

Me.User= CurrentUser

This will get the name of the current user, (funny that!) and put it into a text box

If you put that in a table, say Systems_Admin or something, then when you are compiling the Switchboard, just look at that value in that table, and see if they have sufficient privalages to get access to certain buttons.
 
Thanks!

That's exactly what I needed.

"It's more like it is now, than it ever has been."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top