Presumably you have already implemented Access' User Level Security
and that each user is presently required to log onto the secure
workgroup before opening your application. Also, you should base your
permissions on groups, rather than individuals, to make maintenance
easier.
IIRC, the Microsoft Access Security FAQ contains a function that tests
whether a particular user is a member of a specified group. You will
need to check the FAQ for it -- see the website in my signature for a
link. You will use the function something like then
IF NOT (UserIsInGroup(currentuser(),"MyGroup")) THEN
Msgbox "Sorry. Permission denied"
Else
[... your code here]
End If
You could also place similar code in the Load() event of the form, and
cancel the Load if the user does not belong to the proper group.
This code will be placed in the Click event of your command button.
I want to take a switchboard button and link it to userids that own update
priviledges and allow them in to the update form. For those that don't have
the update priviledges then I want a message to display saying they don't
have blah blah rights. Is there a way to do this?
Thanks
David F
**********************
(e-mail address removed)
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security