Message Prompt when editing already entered record

Kozbot

Registered User.
Local time
Yesterday, 21:46
Joined
Jan 16, 2013
Messages
110
This may be a simple question.

But how do I have a message box pop up that warns the user he is about to edit an already entered record?

Is there a setting for this in the form design. Or do I need VBA, in which case what form event would I tie the msg box too?
 
What exactly does this mean
he is about to edit an already entered record?

Do you mean enter a record that already exists --- create a duplicate?
 
What exactly does this mean


Do you mean enter a record that already exists --- create a duplicate?

No.

I mean that the user is editing an existing record. I want the user to see a warning informing him is editing EXISTING data, not entering new data.

Our QC techs can get a bit trigger happy and I don't want them writing over existing records accidently. Ideally I'd like it to say "Warning: You are editing existing data. Proceed?"
 
Code:
Private Sub Form_Dirty(Cancel As Integer)
 If Not Me.NewRecord Then
  MsgBox "Warning! You are Editing an Existing Record!"
 End If
End Sub
Linq ;0)>
 
Code:
Private Sub Form_Dirty(Cancel As Integer)
 If Not Me.NewRecord Then
  MsgBox "Warning! You are Editing an Existing Record!"
 End If
End Sub
Linq ;0)>

Ah this works

However I want the user to still be able to edit the record after clicking out of the msgbox.
 
...I want the user to still be able to edit the record after clicking out of the msgbox...
There's nothing in the above code to prevent that! The OnDirty event only pops once, after that the Record can be edited, unless you've done something else to prevent it.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom