I have a form that is based on a query which contains 2 tables. These tables have a one-to-one relationship.
This form allows edits and deletions.
I have a SAVE button on my form. The code follows.
Private Sub SaveBtn_Click()
On Error GoTo Err_SaveBtn_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox "Your Data is Saved!", vbOKOnly
Exit_SaveBtn_Click:
Exit Sub
Err_SaveBtn_Click:
MsgBox Err.Description
Resume Exit_SaveBtn_Click
End Sub
This works fine except I would like to verify that the user did actually change data in one of the fields prior to returning the message 'Your Data is Saved!'
Currently, after clicking on the SaveBtn, the record is saved and the user receives the message.
I would like it to say something like 'You have not made any changes to the data' if in fact no edit has been made.
Does this make sense at all?
Linda
This form allows edits and deletions.
I have a SAVE button on my form. The code follows.
Private Sub SaveBtn_Click()
On Error GoTo Err_SaveBtn_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox "Your Data is Saved!", vbOKOnly
Exit_SaveBtn_Click:
Exit Sub
Err_SaveBtn_Click:
MsgBox Err.Description
Resume Exit_SaveBtn_Click
End Sub
This works fine except I would like to verify that the user did actually change data in one of the fields prior to returning the message 'Your Data is Saved!'
Currently, after clicking on the SaveBtn, the record is saved and the user receives the message.
I would like it to say something like 'You have not made any changes to the data' if in fact no edit has been made.
Does this make sense at all?
Linda