On May 9, 3:24 am, Alan Carpenter <N...@iHome.nzwrote:
Use DoCmd.SetWarnings False to torn warnings off
Use DoCmd.SetWarnings True to torn warnings on
Sub test()
Dim stSql
stSql = "INSERT INTO Temp values(""fred"")"
DoCmd.SetWarnings False
DoCmd.RunSQL stSql
DoCmd.SetWarnings True
End Sub
Cheers,
Alan
lory <giannotti.lore...@gmail.comwrote innews:11**********************@h2g2000hsg.googleg roups.com:
Hi,
whan I have for example a vba script
stSql = "INSERT INTO table..."
DoCmd.RunSQL stSql
associated with a command, and then I click on it there is an access
popup that informs me how many rows will be affected (inserted,
deleted...).
How can I suppress this dialog?
Thanks,
Lorenzo- Hide quoted text -
- Show quoted text -
If you use the SetWarnings to TURN warnings on and off be sure to call
the SetWarnings True in the Exit_Routine secion of your sub. If you
dont anfd the code crashed then the SetWarnings may or may not be
processed. Learn to error trap and use it in all of your code.