Msg Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to use code to prevent the unauthorised deletion of a record.
I use the following Triggered by the on current event to lock existing
records whilst allowing new records.
If IsNull(FieldName) Then
Me.FieldName.Locked=False
Else
Me.FieldName.Locked = True
End If

In the event that it is true I would like to display a message Box advising
the user that they must enter a security code to delete the entry, and then
if the code is valid reset the FieldName .Locked to False.
Can anyone suggest some suitable code.
Thanks
 
I want to use code to prevent the unauthorised deletion of a record.

I'd suggest using code in the BeforeDeleteConfirm event. If you set
Cancel to true in this event (with an appropriate warning msgbox to
the user) the deletion will not take place.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top