Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Warnings 1

Status
Not open for further replies.

Zumbro

Technical User
Nov 10, 2001
6
US
Hello All,
I run a delete query to remove bogus data entry,I would like have it attached to a button But! have it unknown to the user as it runs. I need some way to respond to the prompts coded.
Thanks
Pbk
 
Here's the buttom code to do it -

Private Sub cmdOK_Click()
On Error GoTo cmdOK_Click_Error
'- Turn off built in warnings
DoCmd.SetWarnings False
DoCmd.OpenQuery ("MyDeleteQuery")

cmdOK_Click_Exit:
'-Turn warnings back on
DoCmd.SetWarnings True
Exit Sub
cmdOK_Click_Error:
MsgBox Err.Description
Resume cmdOK_Click_Exit
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top