Buttons

ddrew

seasoned user
Local time
Today, 10:49
Joined
Jan 26, 2003
Messages
911
I have recently designed a database complete with form for a karate club that I belong to. I have placed on the form a button to "Delete A Record". My problem is that there is no warning message that you are about to delete a record, i.e "Are You Sure You Want To Delete This Record". I'm sure there as a way I can build this in, I just doont know how.
 
Tools > Options > Edit/Find tab and be sure the 3 'Confirm' items are checked.

hth,
Jack
 
A more user friendly option may be:

If MsgBox("You are about to delete this record. Is that correct ?", vbYesNo + vbInformation, "Your Name") = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
else
end if
 
Re Buttons

Many thanks Oddsoftman it worked a treat, Im still fairly new to this game so VB is all a bit strange. Basics are OK. Cheers
 
There can only be one explanation - ddrew is the ghost of Sigmund Freud. :p
 
ddrew,

You should also be careful that you have not accidently turned the SetWarnings off.

DoCmd.SetWarnings False

If you use that command, ensure that you are turning the warnings back on so that you (your users) will receive the proper warnings when needed. You should also include the DoCmd.SetWarnings True in your error handling incase your routine fails and exits because of a runtime error.

HTH
 
glad my previous post was of some help.
Follow ghudsons advice - as the code I posted indicates.
Dave
 

Users who are viewing this thread

Back
Top Bottom