D
Darrell Childress
I have a form which contains a button to run an update query. When
clicking the button, it warns of running an update query to which one
must respond "Yes". Then it informs you that it is going to update x
number of records to which one must again respond "Yes". I have used
macros in the past to turn off and then back on these warnings, but
lately I have tried to write the code instead of macros. What would be
the code for this?
For reference, this is what I have right now:
Private Sub UpdateMPS_Button_Click()
On Error GoTo Err_UpdateMPS_Button_Click
Dim stDocName As String
stDocName = "qryTotalHours_WorkCenters_Update"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Me.Requery
Exit_UpdateMPS_Button_Click:
Exit Sub
Err_UpdateMPS_Button_Click:
MsgBox Err.Description
Resume Exit_UpdateMPS_Button_Click
End Sub
Thanks much,
Darrell
clicking the button, it warns of running an update query to which one
must respond "Yes". Then it informs you that it is going to update x
number of records to which one must again respond "Yes". I have used
macros in the past to turn off and then back on these warnings, but
lately I have tried to write the code instead of macros. What would be
the code for this?
For reference, this is what I have right now:
Private Sub UpdateMPS_Button_Click()
On Error GoTo Err_UpdateMPS_Button_Click
Dim stDocName As String
stDocName = "qryTotalHours_WorkCenters_Update"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Me.Requery
Exit_UpdateMPS_Button_Click:
Exit Sub
Err_UpdateMPS_Button_Click:
MsgBox Err.Description
Resume Exit_UpdateMPS_Button_Click
End Sub
Thanks much,
Darrell