I have a bunch of append queries running from a command button on a form. I would like to automatically bypass all of the pop-up messages that ask if I would like to update a table and then append records.
At this point I am clicking the yes option over 50 times.
I am wondering if there is a way to turn those messages off rather than sending key strokes.
Thanks for your help
Below is the code:
Private Sub Command6_Click()
Dim qry1 As String
Dim qry2 As String
Dim qry3 As String
Dim qry4 As String
Dim qry5 As String
Dim qry6 As String
Dim qry7 As String
Dim qry8 As String
Dim qry9 As String
Dim qry10 As String
Dim qry11 As String
Dim qry12 As String
Dim qry13 As String
Dim qry14 As String
Dim qry15 As String
Dim qry16 As String
Dim qry17 As String
Dim qry18 As String
Dim qry19 As String
Dim qry20 As String
Dim qry21 As String
Dim qry22 As String
Dim qry23 As String
Dim rpt1 As String
qry1 = "qryArtsDesignEntertainmentMedia"
qry2 = "qryArchitectsEngineers"
qry3 = "qryBuildingGroundsMaintenanceCleaning"
qry4 = "qryBusinessFinancialOperations"
qry5 = "qryCommunitySocialServices"
qry6 = "qryComputerMathematical"
qry7 = "qryConstructionExtraction"
qry8 = "qryEducationTrainingLibrary"
qry9 = "qryFarmingFishingForestry"
qry10 = "qryFoodLodging"
qry11 = "qryHealthcare"
qry12 = "qryInstallationMaintenanceRepair"
qry13 = "qryLegal"
qry14 = "qryLifePhysicalSocialScience"
qry15 = "qryManagement"
qry16 = "qryMilitary"
qry17 = "qryNursing"
qry18 = "qryOfficeAdministrativeSupport"
qry19 = "qryPersonalCareServiceGaming"
qry20 = "qryProduction"
qry21 = "qryProtectiveServices"
qry22 = "qrySalesRelated"
qry23 = "qryTransportationMaterialMoving"
rpt1 = "rptJobOpening"
DoCmd.OpenQuery qry1, acViewPreview, acReadOnly
DoCmd.OpenQuery qry2, acViewNormal, acReadOnly
DoCmd.OpenQuery qry3, acViewNormal, acReadOnly
DoCmd.OpenQuery qry4, acViewNormal, acReadOnly
DoCmd.OpenQuery qry5, acViewNormal, acReadOnly
DoCmd.OpenQuery qry6, acViewNormal, acReadOnly
DoCmd.OpenQuery qry7, acViewNormal, acReadOnly
DoCmd.OpenQuery qry8, acViewNormal, acReadOnly
DoCmd.OpenQuery qry9, acViewNormal, acReadOnly
DoCmd.OpenQuery qry10, acViewNormal, acReadOnly
DoCmd.OpenQuery qry11, acViewNormal, acReadOnly
DoCmd.OpenQuery qry12, acViewNormal, acReadOnly
DoCmd.OpenQuery qry13, acViewNormal, acReadOnly
DoCmd.OpenQuery qry14, acViewNormal, acReadOnly
DoCmd.OpenQuery qry15, acViewNormal, acReadOnly
DoCmd.OpenQuery qry16, acViewNormal, acReadOnly
DoCmd.OpenQuery qry17, acViewNormal, acReadOnly
DoCmd.OpenQuery qry18, acViewNormal, acReadOnly
DoCmd.OpenQuery qry19, acViewNormal, acReadOnly
DoCmd.OpenQuery qry20, acViewNormal, acReadOnly
DoCmd.OpenQuery qry21, acViewNormal, acReadOnly
DoCmd.OpenQuery qry22, acViewNormal, acReadOnly
DoCmd.OpenQuery qry23, acViewNormal, acReadOnly
DoCmd.OpenReport rpt1, acViewPreview, , , acWindowNormal
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
At this point I am clicking the yes option over 50 times.
I am wondering if there is a way to turn those messages off rather than sending key strokes.
Thanks for your help
Below is the code:
Private Sub Command6_Click()
Dim qry1 As String
Dim qry2 As String
Dim qry3 As String
Dim qry4 As String
Dim qry5 As String
Dim qry6 As String
Dim qry7 As String
Dim qry8 As String
Dim qry9 As String
Dim qry10 As String
Dim qry11 As String
Dim qry12 As String
Dim qry13 As String
Dim qry14 As String
Dim qry15 As String
Dim qry16 As String
Dim qry17 As String
Dim qry18 As String
Dim qry19 As String
Dim qry20 As String
Dim qry21 As String
Dim qry22 As String
Dim qry23 As String
Dim rpt1 As String
qry1 = "qryArtsDesignEntertainmentMedia"
qry2 = "qryArchitectsEngineers"
qry3 = "qryBuildingGroundsMaintenanceCleaning"
qry4 = "qryBusinessFinancialOperations"
qry5 = "qryCommunitySocialServices"
qry6 = "qryComputerMathematical"
qry7 = "qryConstructionExtraction"
qry8 = "qryEducationTrainingLibrary"
qry9 = "qryFarmingFishingForestry"
qry10 = "qryFoodLodging"
qry11 = "qryHealthcare"
qry12 = "qryInstallationMaintenanceRepair"
qry13 = "qryLegal"
qry14 = "qryLifePhysicalSocialScience"
qry15 = "qryManagement"
qry16 = "qryMilitary"
qry17 = "qryNursing"
qry18 = "qryOfficeAdministrativeSupport"
qry19 = "qryPersonalCareServiceGaming"
qry20 = "qryProduction"
qry21 = "qryProtectiveServices"
qry22 = "qrySalesRelated"
qry23 = "qryTransportationMaterialMoving"
rpt1 = "rptJobOpening"
DoCmd.OpenQuery qry1, acViewPreview, acReadOnly
DoCmd.OpenQuery qry2, acViewNormal, acReadOnly
DoCmd.OpenQuery qry3, acViewNormal, acReadOnly
DoCmd.OpenQuery qry4, acViewNormal, acReadOnly
DoCmd.OpenQuery qry5, acViewNormal, acReadOnly
DoCmd.OpenQuery qry6, acViewNormal, acReadOnly
DoCmd.OpenQuery qry7, acViewNormal, acReadOnly
DoCmd.OpenQuery qry8, acViewNormal, acReadOnly
DoCmd.OpenQuery qry9, acViewNormal, acReadOnly
DoCmd.OpenQuery qry10, acViewNormal, acReadOnly
DoCmd.OpenQuery qry11, acViewNormal, acReadOnly
DoCmd.OpenQuery qry12, acViewNormal, acReadOnly
DoCmd.OpenQuery qry13, acViewNormal, acReadOnly
DoCmd.OpenQuery qry14, acViewNormal, acReadOnly
DoCmd.OpenQuery qry15, acViewNormal, acReadOnly
DoCmd.OpenQuery qry16, acViewNormal, acReadOnly
DoCmd.OpenQuery qry17, acViewNormal, acReadOnly
DoCmd.OpenQuery qry18, acViewNormal, acReadOnly
DoCmd.OpenQuery qry19, acViewNormal, acReadOnly
DoCmd.OpenQuery qry20, acViewNormal, acReadOnly
DoCmd.OpenQuery qry21, acViewNormal, acReadOnly
DoCmd.OpenQuery qry22, acViewNormal, acReadOnly
DoCmd.OpenQuery qry23, acViewNormal, acReadOnly
DoCmd.OpenReport rpt1, acViewPreview, , , acWindowNormal
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub