Exporting Query Data from Access 2003 to Excel 2003

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eskelies
    New Member
    • May 2007
    • 55

    Exporting Query Data from Access 2003 to Excel 2003

    Hello all,

    I have data, which is separated into account numbers (ie. 10, 20, 30), but it exists in one query. Right now, I have an access macro "transferspread sheet," which is exporting all the account numbers into one worksheet.

    My question:

    How can I go about exporting data from the query into excel, so that each different fund number has it's own worksheet and it's corresponding data?

    Thank you. Your assistance would be greatly appreciated.
  • eskelies
    New Member
    • May 2007
    • 55

    #2
    Sub Holdings()
    '
    ' Macro1 Macro

    '


    Sheets("Fund_Nu mbers").Select
    Range("A1").Sel ect
    Counter = 0
    Do Until ActiveCell = ""

    Sheets("Fund_Nu mbers").Select
    ActiveCell.Offs et(1, 0).Select
    If ActiveCell = "" Then Exit Do
    Selection.Copy
    Sheets.Add
    ActiveSheet.Pas te Destination:=Ac tiveSheet.Range ("A1")
    ActiveSheet.Nam e = Range("A1")
    Counter = Counter + 1

    Loop


    End Sub


    So this code in excel will give me all the fund numbers which I exported from Access. I also exported all the data in my database through the transfer spreadsheet. Now I need to have the macro go into the other spreadsheets and extract that information and paste it into the new spreadsheets I created. I know this is more excel now, but any help would be appreciated.
    Last edited by eskelies; Jul 31 '07, 07:07 PM. Reason: code added...

    Comment

    • Boxcar74
      New Member
      • May 2007
      • 42

      #3
      One way to do this is to query from Excel.
      I posted it here.


      It's different but it work for me!!

      -- Boxcar

      Comment

      Working...