I can't see the wood for the tree's here, I have some code set up to
run through a bunch of delete queries, re-append fresh information to
local DB tables then run a report. But in the code below the Append
queires (stDocName40 thru' stDocName45) don't run (info does not
append to the table) when I execute the code.
I don't see why it doesn't work and I'm confused. Any ideas? I've
checked, double checked and triple checked for any typo's, maybe I'm
missing something here ...? When I double click the Append Q's in the
database they work fine / as intended.
*********
Private Sub FormMainRunReport_Click()
On Error GoTo Err_FormMainRunReport_Click
DoCmd.Hourglass True
Dim stDocName1 As String
Dim stDocName2 As String
Dim stDocName3 As String
Dim stDocName4 As String
Dim stDocName5 As String
Dim stDocName6 As String
Dim stDocName7 As String
Dim stDocName8 As String
Dim stDocName9 As String
Dim stDocName10 As String
Dim stDocName11 As String
Dim stDocName12 As String
Dim stDocName13 As String
Dim stDocName14 As String
Dim stDocName15 As String
Dim stDocName16 As String
Dim stDocName17 As String
Dim stDocName18 As String
Dim stDocName19 As String
Dim stDocName20 As String
Dim stDocName21 As String
Dim stDocName22 As String
Dim stDocName23 As String
Dim stDocName24 As String
Dim stDocName25 As String
Dim stDocName26 As String
Dim stDocName27 As String
Dim stDocName28 As String
Dim stDocName29 As String
Dim stDocName30 As String
Dim stDocName31 As String
Dim stDocName32 As String
Dim stDocName33 As String
Dim stDocName34 As String
Dim stDocName35 As String
Dim stDocName36 As String
Dim stDocName37 As String
Dim stDocName38 As String
Dim stDocName39 As String
Dim stDocName40 As String
Dim stDocName41 As String
Dim stDocName42 As String
Dim stDocName43 As String
Dim stDocName44 As String
Dim stDocName45 As String
Dim stDocName46 As String
Dim stDocName47 As String
Dim stDocName48 As String
Dim stDocName49 As String
Dim stDocName50 As String
Dim stDocName51 As String
Dim stDocName52 As String
Dim stDocName53 As String
stDocName1 = "DeleteQry_AP_ADD_SPEC2"
stDocName2 = "DeleteQry_AP_ADD_SPEC7"
stDocName3 = "DeleteQry_AP_APPARATUS"
stDocName4 = "DeleteQry_AP_CABINET_RACK"
stDocName5 = "DeleteQry_AP_CHANNEL"
stDocName6 = "DeleteQry_AP_CHANNEL_TYPE"
stDocName7 = "DeleteQry_AP_COMPONENT"
stDocName8 = "DeleteQry_AP_COMPONENT_SYS_IO_TYPE"
stDocName9 = "DeleteQry_AP_CONTROL_SYSTEM_TAG"
stDocName10 = "DeleteQry_AP_CONTROLLER"
stDocName11 = "DeleteQry_AP_DRAWING"
stDocName12 = "DeleteQry_AP_FLOW"
stDocName13 = "DeleteQry_AP_LEVEL_INSTRUMENT"
stDocName14 = "DeleteQry_AP_PANEL"
stDocName15 = "DeleteQry_AP_PANEL_STRIP"
stDocName16 = "DeleteQry_AP_PD_GENERAL"
stDocName17 = "DeleteQry_AP_RACK_POSITION"
stDocName18 = "DeleteQry_AP_SPEC_SHEET_DATA"
stDocName19 = "DeleteQry_AP_REVISION"
stDocName20 = "DeleteQry_AP_UDF_COMPONENT"
stDocName21 = "DeleteQry_AP_UDF_CS_TAG"
stDocName22 = "DeleteQry_tblInOutputTags"
stDocName23 = "DeleteQry_UDT_SUPPORT6"
stDocName24 = "AppendQry_ADD_SPEC2"
stDocName25 = "AppendQry_ADD_SPEC7"
stDocName26 = "AppendQry_APPARATUS"
stDocName27 = "AppendQry_CABINET_RACK"
stDocName28 = "AppendQry_CHANNEL"
stDocName29 = "AppendQry_CHANNEL_TYPE"
stDocName30 = "AppendQry_COMPONENT"
stDocName31 = "AppendQry_COMPONENT_SYS_IO_TYPE"
stDocName32 = "AppendQry_CONTROL_SYSTEM_TAG"
stDocName33 = "AppendQry_CONTROLLER"
stDocName34 = "AppendQry_DRAWING"
stDocName35 = "AppendQry_FLOW"
stDocName36 = "AppendQry_LEVEL_INSTRUMENT"
stDocName37 = "AppendQry_PANEL"
stDocName38 = "AppendQry_PANEL_STRIP"
stDocName39 = "AppendQry_PD_GENERAL"
stDocName40 = "AQryInputTag1"
stDocName41 = "AQryInputTag2"
stDocName42 = "AQryInputTag3"
stDocName43 = "AQryInputTag4"
stDocName44 = "AQryOutputTag1"
stDocName45 = "AQryOutputTag2"
stDocName46 = "AppendQry_RACK_POSITION"
stDocName47 = "AppendQry_SPEC_SHEET_DATA"
stDocName48 = "AppendQry_REVISION"
stDocName49 = "AppendQry_UDF_COMPONENT"
stDocName50 = "AppendQry_UDF_CS_TAG"
stDocName51 = "AppendQry_UDT_SUPPORT6"
stDocName52 = "QryDCSCIOA"
stDocName53 = "FormMain"
DoCmd.OpenQuery stDocName1, acViewNormal
DoCmd.OpenQuery stDocName2, acViewNormal
DoCmd.OpenQuery stDocName3, acViewNormal
DoCmd.OpenQuery stDocName4, acViewNormal
DoCmd.OpenQuery stDocName5, acViewNormal
DoCmd.OpenQuery stDocName6, acViewNormal
DoCmd.OpenQuery stDocName7, acViewNormal
DoCmd.OpenQuery stDocName8, acViewNormal
DoCmd.OpenQuery stDocName9, acViewNormal
DoCmd.OpenQuery stDocName10, acViewNormal
DoCmd.OpenQuery stDocName11, acViewNormal
DoCmd.OpenQuery stDocName12, acViewNormal
DoCmd.OpenQuery stDocName13, acViewNormal
DoCmd.OpenQuery stDocName14, acViewNormal
DoCmd.OpenQuery stDocName15, acViewNormal
DoCmd.OpenQuery stDocName16, acViewNormal
DoCmd.OpenQuery stDocName17, acViewNormal
DoCmd.OpenQuery stDocName18, acViewNormal
DoCmd.OpenQuery stDocName19, acViewNormal
DoCmd.OpenQuery stDocName20, acViewNormal
DoCmd.OpenQuery stDocName21, acViewNormal
DoCmd.OpenQuery stDocName22, acViewNormal
DoCmd.OpenQuery stDocName23, acViewNormal
DoCmd.OpenQuery stDocName24, acViewNormal
DoCmd.OpenQuery stDocName25, acViewNormal
DoCmd.OpenQuery stDocName26, acViewNormal
DoCmd.OpenQuery stDocName27, acViewNormal
DoCmd.OpenQuery stDocName28, acViewNormal
DoCmd.OpenQuery stDocName29, acViewNormal
DoCmd.OpenQuery stDocName30, acViewNormal
DoCmd.OpenQuery stDocName31, acViewNormal
DoCmd.OpenQuery stDocName32, acViewNormal
DoCmd.OpenQuery stDocName33, acViewNormal
DoCmd.OpenQuery stDocName34, acViewNormal
DoCmd.OpenQuery stDocName35, acViewNormal
DoCmd.OpenQuery stDocName36, acViewNormal
DoCmd.OpenQuery stDocName37, acViewNormal
DoCmd.OpenQuery stDocName38, acViewNormal
DoCmd.OpenQuery stDocName39, acViewNormal
DoCmd.OpenQuery stDocName40, acViewNormal
DoCmd.OpenQuery stDocName41, acViewNormal
DoCmd.OpenQuery stDocName42, acViewNormal
DoCmd.OpenQuery stDocName43, acViewNormal
DoCmd.OpenQuery stDocName44, acViewNormal
DoCmd.OpenQuery stDocName45, acViewNormal
DoCmd.OpenQuery stDocName46, acViewNormal
DoCmd.OpenQuery stDocName47, acViewNormal
DoCmd.OpenQuery stDocName48, acViewNormal
DoCmd.OpenQuery stDocName49, acViewNormal
DoCmd.OpenQuery stDocName50, acViewNormal
DoCmd.OpenQuery stDocName51, acViewNormal
DoCmd.OpenReport stDocName52, acViewPreview
DoCmd.Close acForm, stDocName53, acSaveNo
DoCmd.Hourglass False
Exit_FormMainRunReport_Click:
Exit Sub
Err_FormMainRunReport_Click:
MsgBox Err.Description
Resume Exit_FormMainRunReport_Click
End Sub