lloydmav
Registered User.
- Local time
- Today, 06:02
- Joined
- Nov 15, 2002
- Messages
- 75
Help!
I have a button which runs a delete query then an ammend query and then an update query but I wanted to get rid of the warning messages eg "You are about to delete 3 records" etc
So I added a DoCmd.SetWarnings (WarningsOff)
command. This worked but the DoCmd.SetWarnings (WarningsOn) command doesn't seem to work and now I'm getting no warning messages. Can anyone see whats wrong with the code below?
Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
DoCmd.SetWarnings (WarningsOff)
Dim stDocName As String
stDocName = "DeleteActionPlanOld"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim stDocName2 As String
stDocName2 = "AppendMaster"
DoCmd.OpenQuery stDocName2, acNormal, acEdit
Dim stDocName12 As String
stDocName12 = "UpdateTypeTask"
DoCmd.OpenQuery stDocName12, acNormal, acEdit
DoCmd.SetWarnings (WarningsOn)
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Thanks for any help

I have a button which runs a delete query then an ammend query and then an update query but I wanted to get rid of the warning messages eg "You are about to delete 3 records" etc
So I added a DoCmd.SetWarnings (WarningsOff)
command. This worked but the DoCmd.SetWarnings (WarningsOn) command doesn't seem to work and now I'm getting no warning messages. Can anyone see whats wrong with the code below?
Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
DoCmd.SetWarnings (WarningsOff)
Dim stDocName As String
stDocName = "DeleteActionPlanOld"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Dim stDocName2 As String
stDocName2 = "AppendMaster"
DoCmd.OpenQuery stDocName2, acNormal, acEdit
Dim stDocName12 As String
stDocName12 = "UpdateTypeTask"
DoCmd.OpenQuery stDocName12, acNormal, acEdit
DoCmd.SetWarnings (WarningsOn)
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Thanks for any help