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
 

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