Hi!
Think perhaps the forms before update event would be best place to do such actions, data validations...
This event fires whenever a user tries to save a record, either by closing the form, moving to another record, hitting SHIFT + ENTER... and it is possible to cancel it, so that for instance if the user selects no, it will not leave the current record (the user can edit, hit ESC...).
I'm afraid it's VBA, but I'll try to guide you thru it, if you haven't alredy solved your challenge:
Enter the forms design view, and find properties for the form. In the events tab, click in the line wher you find the "Before Update" event. Click the button with three dots at the right, and in the following dialog box, select "Code Builder".
This should put you in the code window, where your cursor will be between the first and last of the code lines below . Paste the blue lines into where your cursor is, so it looks like this (well, not the colors;-))
[tt]Private Sub Form_BeforeUpdate(Cancel as Integer)
Dim iAnswer As Integer
If Me.Dirty Then
iAnswer=MsgBox("Save changes to the record?", vbYesNo)
If iAnswer=vbNo Then
Cancel=True
End If
End If
End Sub[/tt]
Short explanation of some two of the lines:
if me.dirty then - if the record has been changed or is new
cancel=true - cancelling whatever action that triggered this event (trying to move to next record, closing form...)
Report back if you don't get it to work!
nice95gle:
Your save command would save design changes to the form, saving records could be for instance:
[tt]docmd.runcommand accmdsaverecord[/tt]
HTH Roy-Vidar