Why does 'set warnings' throws debugger?

  • Thread starter Thread starter postman
  • Start date Start date
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
******************************************************
 
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.
 
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."
 
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.
 
Back
Top