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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto select Yes/No dialogue boxes

Status
Not open for further replies.

Lorimare

MIS
Dec 9, 2003
24
0
0
US
How can i set up my access application so the user does NOT have to click yes/no for each step the code is trying to execute?

For example, in code I have a table having a delete query run agaisnt it, then an append query adding to it. I want it so the yes button is automatically selected and the user does nothing.

Thank you in advance.
 
Hi!

Are you talking about the "your gonna add/delete..." msgbboxes, and are you running the statements with docmd.runsql or some equivalent?

If so, surround the statements with:

[tt]docmd.setwarnings false
' the queries...
docmd.setwarnings true[/tt]

Roy-Vidar
 
Here is an example of the code I'm running:

Dim stDocName As String

'run make table query
stDocName = "qry_DeleteFrom_OH"
DoCmd.OpenQuery stDocName, acNormal, acEdit

stDocName = "qry_Append_Data"
DoCmd.OpenQuery stDocName, acNormal, acEdit


'run make table query
stDocName = "qry_Delete_from_WrkIssue"
DoCmd.OpenQuery stDocName, acNormal, acEdit

stDocName = "qry_Append_wrk_issue"
DoCmd.OpenQuery stDocName, acNormal, acEdit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top