Get rid of auto message when about to update query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to get rid of the code that is making the alert msg box pop up (access help) when I am about to update records

How can I do this
I'm not sure which code to delete

Here is the code

Private Sub runUpdateQuery_Click(

On Error GoTo Err_runUpdateQuery_Clic

Dim stDocName As Strin

stDocName = "qryUpdateIndCSZ
DoCmd.OpenQuery stDocName, acNormal, acEdi

Exit_runUpdateQuery_Click
Exit Su

Err_runUpdateQuery_Click
MsgBox Err.Descriptio
Resume Exit_runUpdateQuery_Clic

End Su

I'm assuming it has to do with the MsgBox Err.Description line - but if some pros could help me out, I'd appreciate it

Thanks!
 
I want to get rid of the code that is making the alert msg box pop
up (access help) when I am about to update records.

How can I do this? I'm not sure which code to delete.

Here is the code.

Private Sub runUpdateQuery_Click()

On Error GoTo Err_runUpdateQuery_Click

Dim stDocName As String

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

Exit_runUpdateQuery_Click:
Exit Sub

Err_runUpdateQuery_Click:
MsgBox Err.Description
Resume Exit_runUpdateQuery_Click

End Sub

I'm assuming it has to do with the MsgBox Err.Description line -
but if some pros could help me out, I'd appreciate it.

Thanks!

Don't assume!!!

Just add 2 lines,
DoCmd.SetWarnings False ' Turn warnings off
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings True ' Turn warnings back on
 
Try ...

Private Sub runUpdateQuery_Click()

On Error GoTo Err_runUpdateQuery_Click

Dim stDocName As String

stDocName = "qryUpdateIndCSZ"
DoCmd.SetWarnings false
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings True

Exit_runUpdateQuery_Click:
Exit Sub

Err_runUpdateQuery_Click:
MsgBox Err.Description
Resume Exit_runUpdateQuery_Click

End Sub

DoCmd.SetWarnings True
-----Original Message-----
I want to get rid of the code that is making the alert
msg box pop up (access help) when I am about to update
records.
How can I do this?
I'm not sure which code to delete.

Here is the code.

Private Sub runUpdateQuery_Click()

On Error GoTo Err_runUpdateQuery_Click

Dim stDocName As String

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

Exit_runUpdateQuery_Click:
Exit Sub

Err_runUpdateQuery_Click:
MsgBox Err.Description
Resume Exit_runUpdateQuery_Click

End Sub

I'm assuming it has to do with the MsgBox Err.Description
line - but if some pros could help me out, I'd appreciate
it.
 
Back
Top