update query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way that when running an update sql in code to supress the message
that asks the user, "are you sure you want to update X records" Yes or no.

'DoCmd.RunSQL "UPDATE tblPI SET tblPI.Email2 = Date() WHERE
tblPI.Pri_responsible=[txtRptTransfer] AND IsNull(Email2) = True And User = "
& "'" & Me.txtUser & "' And ([Email1] < Date() - [Time1]) ;"

Thanks
 
Try:
DoCmd.SetWarnings False
Don't forget to turn it back on again.

Better still:
dbEngine(0)(0).Execute strSQL, dbFailOnError
That way you get to hear about it if (and only if) something goes wrong.
 
Back
Top