Turn off delete record message using code.

G

Greg

I have a button on a form that contains a subform. When I click on the button
the selected record on the subform is deleted from the underlying bound
table. Is it possible to stop the message box appearing, advising that a
record is about to be deleted, using code for this procedure only. Ie I still
want to be advised if I run other delete queries within the application.
 
G

Gina Whipp

Greg,

DoCmd.SetWarnings False 'turns off messages
***Put your delete sequence in here***
DoCmd.SetWarnings True 'turns messages back on
 
G

Greg

Thanks Gina!

Gina Whipp said:
Greg,

DoCmd.SetWarnings False 'turns off messages
***Put your delete sequence in here***
DoCmd.SetWarnings True 'turns messages back on


--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II
 
Top