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

Lock in YES answer for 3 queries.

Status
Not open for further replies.

cimoli

Technical User
Jul 30, 2010
207
US
I have a good working Form button. However, I am asked 9 times to answer YES when 3 queries that are inside the button,
ask like, you are about to override, etc etc. A dialog thing. The 3 queries create 3 make tables.

I will always answer yes.

Is there a way to permanently lock in the YES for these 3 queries?
I read something about Set Warnings. I wonder.

Here is the button ON Click. Thanks Glen.

Private Sub cmd3010M_Click()

'MAKE TABLES
DoCmd.OpenQuery "Qry3010B", acNormal, acEdit
DoCmd.OpenQuery "Qry3010C", acNormal, acEdit
DoCmd.OpenQuery "Qry3010E", acNormal, acEdit

'MAKE REPORT - IN
DoCmd.OpenReport "rpt3010M", acViewPreview
DoCmd.Maximize

End Sub
 
I think I figured it out. It works. I do not get the 9 questions. Fast.
If you see an improvement, please yell. Glen.

Private Sub cmd3010M_Click()
'9/12/2020 VBA code Glen

DoCmd.Hourglass True
DoCmd.SetWarnings False

'MAKE TABLES
DoCmd.OpenQuery "Qry3010B", acNormal, acEdit
DoCmd.OpenQuery "Qry3010C", acNormal, acEdit
DoCmd.OpenQuery "Qry3010E", acNormal, acEdit

DoCmd.Hourglass False
DoCmd.SetWarnings True

'MAKE REPORT - IN
DoCmd.OpenReport "rpt3010M", acViewPreview
DoCmd.Maximize

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top