ignoring access warning messages

C

Chris

I have a form with two subforms. When one subform is shown and I click
reset the subform controls are reset and the main forms controls are reset.
When the two subforms are shown and I click the reset button the message
"are you sure you want to delete this record appears"

How do I stop showing this meassage?

Code

Me.txtSoaid.SetFocus ' pk textbok

DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
ResetControlsSub frmCreditor ' 1st subform
ResetControlsSub frmDebtCollection '2nd subform


When a record is about to be deleted an access message is appearing to say
"Do you wish to delete this record"
 
D

Douglas J. Steele

DoCmd.SetWarnings False before you run the code, DoCmd.SetWarnings True
afterwards.
 
L

Larry Daugherty

Hi Chris,

Look in Help for SetWarnings.Set warnings off just before you delete and
then remember to turn them on again immediately after the operation. Many
warnings are affected so turn them back on!

HTH
 

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