Enable a button

benc

Registered User.
Local time
Today, 01:25
Joined
Dec 31, 2001
Messages
57
I am trying to enable according to a variable.

I have disabled a button by default and want to on form open enable it a criteria is met. I have written the following:

Private Sub Form_Open(Cancel As Integer)

If gvusertype = admin Then

Me.adminmenu.Enabled

End If

End Sub

However i get an error of: "Invalid Use of Property"

Can anyone help. Thanks
 
don't forget to do the else part as well, to disable it
 
I would toggle the visible property rather than the enabled property because I don't think that users should see things that they can't use.
 
That works. The only problem with switching the visibility on and off is that it leaves gaps in the form layout which personally i think looks messy. But Thank you for all your help
 

Users who are viewing this thread

Back
Top Bottom