Hi all,
I'm really no good with VBA code & found & amended the following code to ask to save before moving on to a new record & also make an audit of a couple of fields. It was working fine until more than one user was accessing the database at any one time:
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Provide the user with the option to save/undo
'changes made to the record in the form
If MsgBox("Changes have been made to this record." _
& vbCrLf & vbCrLf & "Do you want to save these changes?" _
, vbYesNo, "Changes Made...") = vbYes Then
DoCmd.Save
Else
DoCmd.RunCommand acCmdUndo
End If
If Not Me.NewRecord Then Call AuditChanges("Quote Inv No")
End Sub
I have amended the code just to:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not Me.NewRecord Then Call AuditChanges("Quote Inv No")
End Sub
But I really want the user to confirm first before it saves as people keep overwriting the wrong fields by accident. Please can someone suggest changes to the code that will mean more than one person can be in the database at a time.
Thanks for your help.
Kind regards
Vicky