Question Locked

display ms acces form buttons to authorised users only

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi,
i have created a form with buttons to access tables and other forms but i dont want every one to access all f he forms and tables. is there a way of using who is logged in to access to determine what buttons are available. hope this makes sense.

Colin.

5 replies

by larryd4

Every button and anything else, for that matter, has a "Visible" attribute in Access. You just need to set the Visible attribute as you load the form depending on the person pushing the button.

Try it manually, set visible to No for your button and see what happens when you open the form.

Then you can code to the Variable in VBA
on event
If "Username" or anyother group variable is equal
Forms!formname.Form!button.Visible = "No"

Or vice versa

by joebloggs31

This is what im trying to get working

If CurrentUser <> "admin" = True Then
Me.forum1.Visible = True
Else
Me.forum1.Visible = False
End If

but unfortunatley its not working

This discussion is closed to new replies.