[AccessD] Stop SQL

Hollis, Virginia hollisvj at pgdp.usec.com
Tue Jun 5 12:21:11 CDT 2007


How do you stop a SQLString from proceeding with the update? If they
press Cancel, it still shows the standard "You are about to update this
record..." What I have below, doesn't give the Update record message
anymore, but it still runs the Update.

 

Even using the standard - you are about to update this record, would be
ok, but it gives an error if I cancel.

 

What stops it from running the update & suppresses error messages if
they cancel the update?

 

SQLString = "UPDATE.....

 

    ' Suppress default Delete Confirm dialog box.

    Response = acDataErrContinue

    ' Display custom dialog box.

    If MsgBox("Update record?", vbOKCancel) = vbCancel Then

        Cancel = True

    Else

 

DoCmd.RunSQL (SQLString)

End If

 

Virginia




More information about the AccessD mailing list