Why does 'set warnings' throws debugger?

P

postman

More code from this forum:
Form Control button: Used to bypass the typical append query warnings.
"Compile error" Method or data member not found!
Highlighted is the ".SetWarnings" bits.
******************************************************
Private Sub Command88_Click()
On Error GoTo Err_Command88_Click

DoCmd.SetWarnngs False
DoCmd.OpenQuery "appqry_SBuyTemp > SBuy Contracts"
DoCmd.OpenQuery "Tbl_SBuy Temp Delete"
DoCmd.SetWarnings True

Exit_Command88_Click:
Exit Sub
Err_Command88_Click:
MsgBox Err.Description
Resume Exit_Command88_Click

End Sub
******************************************************
 
P

postman

Yup done some VBA Help research:
How does this look?

MsgBox(prompt[, buttons] vbOKOnly)

The control button actually runs three append queries & one delete query so
would like the "ok" button popped up once with the (below) text above the
button:

SBuyTemp > SBuy Contracts CASH
SBuyTemp > Tbl_Print Contracts-CASH
SBuyTemp > NewStock
Tbl_SBuy Temp Delete

Thanks.
 
V

Van T. Dinh

MsgBox "SBuyTemp > SBuy Contracts CASH" & vbCrLf & _
"SBuyTemp > Tbl_Print Contracts-CASH" & vbCrLf & _
"SBuyTemp > NewStock" & vbCrLf & _
"Tbl_SBuy Temp Delete", vbOKOnly + vbInformation, _
"My Silly MsgBox Title."
 
P

postman

Brilliant
THANKS Van T. Dinh


Van T. Dinh said:
MsgBox "SBuyTemp > SBuy Contracts CASH" & vbCrLf & _
"SBuyTemp > Tbl_Print Contracts-CASH" & vbCrLf & _
"SBuyTemp > NewStock" & vbCrLf & _
"Tbl_SBuy Temp Delete", vbOKOnly + vbInformation, _
"My Silly MsgBox Title."


--
HTH
Van T. Dinh
MVP (Access)


postman said:
Yup done some VBA Help research:
How does this look?

MsgBox(prompt[, buttons] vbOKOnly)

The control button actually runs three append queries & one delete query so
would like the "ok" button popped up once with the (below) text above the
button:

SBuyTemp > SBuy Contracts CASH
SBuyTemp > Tbl_Print Contracts-CASH
SBuyTemp > NewStock
Tbl_SBuy Temp Delete

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top