I don't understand what you're trying to do. I would just write the queries you need in Access and then export to Excel.
--- In [email protected], "luvmymelody" <[EMAIL PROTECTED]> wrote: > > Hello all, > I have an excel spreadsheet that I track record counts of tables > created each day. I have vba code behind a button on the sheet. the > vba code opens the various sheets, saves them in a newer format than > the excel 2.0, then closes each sheet. this process is done one at a > time. > I now want to track the record counts in access. but the vba code in > excel does not work in Access. > Is there any way of doing this? > Here is a sample of my code in excel. > Jim Wagner > > > Private Sub CommandButton1_Click() > ' > ' Saves all of the following workbooks as v5 > ' > ' > Application.DisplayAlerts = False > > Workbooks.Open Filename:="W:\DATA MANAGEMENT SERVICES\MASTER > PEOPLESOFT TABLES\R&D-ACCOUNTS.xls" > Workbooks("R&D-ACCOUNTS.xls").Activate 'Accounts > ActiveWorkbook.SaveAs Filename:= _ > ActiveWorkbook.FullName _ > , FileFormat:=xlExcel5, Password:="", WriteResPassword:="", _ > ReadOnlyRecommended:=False, CreateBackup:=False > Application.Wait (Now + TimeValue("0:00:01")) > ActiveWorkbook.Close False > > Application.Wait (Now + TimeValue("0:00:01")) > > Workbooks.Open Filename:="W:\DATA MANAGEMENT SERVICES\MASTER > PEOPLESOFT TABLES\R&D-ACCRUALS.xls" > Workbooks("R&D-ACCRUALS.xls").Activate 'Accruals > ActiveWorkbook.SaveAs Filename:= _ > ActiveWorkbook.FullName _ > , FileFormat:=xlExcel5, Password:="", WriteResPassword:="", _ > ReadOnlyRecommended:=False, CreateBackup:=False > Application.Wait (Now + TimeValue("0:00:01")) > ActiveWorkbook.Close False >
