Give User Option to restore changed record.

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
 
R

Rowland

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
 
L

Les

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top