Prompt user after changing field

ritenow

New member
Local time
Today, 16:30
Joined
Jul 31, 2002
Messages
7
I was wondering how you would make a simple form that would prompt the user any time that the field on the form has been changed. I was thinking about a prompt that asks the user:
"Are you sure you want to change the [field_name]?" and the user has a choice of clicking "yes" or "no".

The reason for this is that the first field on the form can easily be accidentally changed. Anyone have any ideas or has implemented such a prompt.

I belive it can be done using a combination of the event procedure and some vba coding, but I have no idea how.

I thank you in advance and look forward to your comments and ideas!

Best regards,
Patrick
 
On the BeforeUpdate event you could do:

Dim stdresponse As Integer

If Not (Me.NewRecord) Then ' code doesn't kick in if the field was empty
stdresponse = MsgBox("Are you sure you want to change this field?", vbYesNo)

If stdresponse = vbNo Then
cancel = True
Me.[yourfieldname].Undo
End If
End If
 
Do you wish to display the Name of the field changed or the Value before it was changed and the value it's been changed to?
 

Users who are viewing this thread

Back
Top Bottom