Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing unauthorized checking

Status
Not open for further replies.
Apr 23, 2002
39
US
I've got a form with several check boxes that users can check to indicate a required administrative task is complete. Checking also updates a time stamp in a table. Once the box is checked, it should not be un-checked, unless the user is a supervisor. So my question is, using the BeforeUpdate event, how do I return to the previous value of "CHECKED" if the user doesn't have the requisite privleges.


Private Sub chk1Completed_BeforeUpdate(Cancel As Integer)
If SupervisorCheck(basGetNetUser.fGetNetUser) = False Then
MsgBox "Sorry, you aren't authorized to take this action"
End If
End Sub

*The function SupervisorCheck returns a boolean indicating if the user is authorized.

Thanks,
Don in Phoenix[shadeshappy]
 
Cancel = True

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top