docmd.setwarnings best use

  • Thread starter Thread starter Mark Andrews
  • Start date Start date
M

Mark Andrews

I setup a cascade to null relationship between two tables and would like to
hide the message that pops up when you
delete a record from the primary table because it uses the Cascade deleting
message and is confusing.

Just looking for some tips on the best way to put DoCmd.Setwarnings into the
code.

Currently I have DoCmd.Setwarnings False in the
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
event

and DoCmd.Setwarnigs True in the
Private Sub Form_AfterDelConfirm(Status As Integer) event

it seems to work but wondering what the best approach is?

Thanks in advance,
Mark
 
Back
Top