Sub RunGLPLUSF203Query()
Dim acApp As Access.Application
Set acApp = New Access.Application
acApp.OpenCurrentDatabase "P:\Departments\General
Accounting\Databases\GLPLUSF203-GL0003-BAL.mdb", False
DoCmd.RunSQL "DELETE tblManagedBalanceSheet.* FROM
tblManagedBalanceSheet;"
acApp.DoCmd.RunSQL "(INSERT INTO tblManagedBalanceSheet
(StatementType,BalSheet,Combo,BalanceSheetCategory,MFACCT,M
FDESC,FAC,FacilityName,Actual2002,CurMo,[Stmt&Acct#]))" & _
" SELECT [FacilityMaster]!
[StatementType] AS StatementType, [ChartOfAccounts]!
[BalSheet] AS BalSheet, [FacilityMaster]![StatementType] &
[ChartOfAccounts]![BalSheet] AS Combo, [tblNSGPTax-
balsheet]![BalanceSheetCategory] AS BalanceSheetCategory,
[GLPLUSF203_GL0003]![MFACCT] AS MFACCT,
[GLPLUSF203_GL0003]![MFDESC] AS MFDESC, [FacilityMaster]!
[FAC] AS FAC, [FacilityMaster]![FacilityName] AS
FacilityName, [GLPLUSF203_GL0003]![MFLY12] AS Actual2002,
[GLPLUSF203_GL0003]![MFCY10] AS CurMo, [FacilityMaster]!
[StatementType] & [ChartOfAccounts]![AccountNumber] AS
[Stmt&Acct#]" & _
" FROM ((GLPLUSF203_GL0003 INNER JOIN
ChartOfAccounts ON [GLPLUSF203_GL0003]![MFACCT] =
[ChartOfAccounts]![Acct#txt]) INNER JOIN FacilityMaster ON
([GLPLUSF203_GL0003]![MFCNTR] = [FacilityMaster]![FAC])
AND ([GLPLUSF203_GL0003]![MFCORP] = [FacilityMaster]!
[Corp])) INNER JOIN [tblNSGPTax-balsheet] ON
ChartOfAccounts.BalSheet = [tblNSGPTax-balsheet]!
[NSPGTax]" & _
" WHERE ((([GLPLUSF203_GL0003]!
[MFCORP]) = 'UHI') And (([FacilityMaster]![OL]) = 'M') And
(([GLPLUSF203_GL0003]![MFLY12] + [GLPLUSF203_GL0003]!
[MFCY10]) <> 0))" & _
" GROUP BY [FacilityMaster]!
[StatementType], [ChartOfAccounts]![BalSheet],
[FacilityMaster]![StatementType] & [ChartOfAccounts]!
[BalSheet], [tblNSGPTax-balsheet]![BalanceSheetCategory],
[GLPLUSF203_GL0003]![MFACCT], [GLPLUSF203_GL0003]![FDESC],
[FacilityMaster]![FAC], [FacilityMaster]![FacilityName],
[GLPLUSF203_GL0003]![MFLY12], [GLPLUSF203_GL0003]!
[MFCY10], [FacilityMaster]![StatementType] &
[ChartOfAccounts]![AccountNumber]" & _
" HAVING ((([FacilityMaster]!
[StatementType]) Not Like '100*' And ([FacilityMaster]!
[StatementType]) Not Like 'Greystone' And
([FacilityMaster]![StatementType]) Not Like 'Tandem') AND
(([GLPLUSF203_GL0003]![MFACCT]) Between '100000'
And '399999'));"
acApp.CloseCurrentDatabase
Set acApp = Nothing
End Sub
-----Original Message-----
Please post the code you're using.