22a6 Sikh Philosophy Network - View Single Post - Disenabling buttons base on User
View Single Post
  #2 (permalink)  
Old 28-Jul-2006, 08:21 AM
Rob Parker's Avatar Rob Parker
Guest
 
Posts: n/a
   
   
Re: Disenabling buttons base on User

Since you can already determine whether the type of user, I'll assume that
you have a function (IsManager in the following lines) that returns True if
the user is a manager.

In the Open event of your form(s), you can enable/disable various controls
as follows:

Me.MyAddButtonName.Enabled = IsManager

You can also set the form properties to allow edits/additions/deletes in the
same fashion:

Me.AllowEdits = IsManager
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/11469-disenabling-buttons-base-on-user.html

HTH,

Rob


"dcash45" wrote in message
news:F56D15D9-ABC1-48F4-AAC4-B61306A775F6@microsoft.com...
> Hello I want to open a form and enable or disenable the buttons base on
> what
> type of user is login.
>
> I have a login form that goes to two different switchboard forms base on
> the
> type of user (manage or employee). But both switchboard calls on some of
> the
> same form; like my states form. This form has the buttons of Add, Update,
> Delete, and so on. The manager would have the right to do all of the
> functions but I want the employees to only have the right to just Update.
> So
> if an employee login and opening the states form I want the Add and Delete
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=11469
> button to be disenable and if a manage login all the buttons stay enable.
>
> So I would like to know does anyone know how to design is code because I
> am
> having some problems designing it.
>
> Thank you,
>



Reply With Quote
 
Page generated in 0.15057 seconds with 25 queries
0