Give User Option to restore changed record.

  • Thread starter Thread starter Les
  • Start date Start date
L

Les

I need to provide the user with a Message box giving them the message "You
are about to change this record do you wish to procced" I then want to give
them the option to "Continue" "Cancel" or "Cancel any changes".

I know it's simple but cant seem to do it.

Thanks

Les
 
lets use this example, on a form you have brought up data
and changed it. Now set up the 'save' button to bring up
a messge box with your do you want to proceede saying.

so it should look like this (example)
Private sub save_Click()
dim msg as variant

msg = msgbox ("this will change the current record do you
want to continue?", vbcritical + vbyesno, "CHANGING
RECORD")

if msg = vbyes then
docmd.Close acForm, "form that has the changes", _
acSaveYes
else
docmd.Close acForm, "form that has the changes", _
acSaveNo
end if

end sub
 
Thanks Rowland

That works fine.


Rowland said:
lets use this example, on a form you have brought up data
and changed it. Now set up the 'save' button to bring up
a messge box with your do you want to proceede saying.

so it should look like this (example)
Private sub save_Click()
dim msg as variant

msg = msgbox ("this will change the current record do you
want to continue?", vbcritical + vbyesno, "CHANGING
RECORD")

if msg = vbyes then
docmd.Close acForm, "form that has the changes", _
acSaveYes
else
docmd.Close acForm, "form that has the changes", _
acSaveNo
end if

end sub
 
Back
Top