hide/show command based on user priviledges

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

Guest

Hi everyone,

I am trying to figure out what is the best way to hide/show a command button
based on the current user priviledges. Basically all I have so far is a
module that captures the NT id and inserts it into a Users table.
I am not sure how and where to place the rest of the code, if the current
user has admin priviledges the command button should show on the form.
Your help is greatly appreciated.
 
Sara said:
Hi everyone,

I am trying to figure out what is the best way to hide/show a command
button
based on the current user priviledges. Basically all I have so far is a
module that captures the NT id and inserts it into a Users table.
I am not sure how and where to place the rest of the code, if the current
user has admin priviledges the command button should show on the form.
Your help is greatly appreciated.

I'd place that code in the form's Load event. You'll need to determine if
the user has admin privilege, then set the button's Visible property based
on that. What determines if a user has admin privilege? A field in the Users
table? If so, just do a DLookUp on the field using the user's id. It's not
possible to be more specific, since you didn't say just how the user's
privilege is determined.

Carl Rapson
 
Back
Top