Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2006
    Posts
    39

    Unanswered: Exporting 3 Access queries into one Exel workbook

    Can someone explain to me how I can export 3 Access queries into one Excel workbook. Is it possible, and if so, how can I link each individual's numbers to their corresponding cells in an Excel spreadsheet. See attachments for examples.
    The names have been covered for privacy.
    Any help to accomplish this would be greatly appreciate.

    Thanks,

    millb
    Attached Thumbnails Attached Thumbnails SP1.jpg   SP2.jpg  

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    Check out http://www.dbforums.com/showpost.php...81&postcount=4

    This includes plenty of code that does what (I think) you are after.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Sep 2006
    Posts
    265
    It would seem that there is a relationship (Rep) between the two queries. If the fields are identical you could try:

    1) Using a Union Join which lists the two sets of records "underneath" each other

    SELECT ....
    UNION ALL SELECT ...

    2) Assuming that the Recordsets are flat 1:1 direct relationship on Rep join the (sub)queries together either showing the variable fields together add one to the other or show the variable fields separately. Don't underestimate queries they are damn powerful unless they become too complicated.

    Simon

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Join all three tables in a single query/SQL statement and export using a macro (or using doCmd.OutputTo in VB).
    George
    Home | Blog

  5. #5
    Join Date
    Dec 2006
    Posts
    39
    Thanks all for the advice! You've been a great help.
    I ended up linking all three queries to a single excel spreadsheet. From there I'm running a macro to copy and paste the data into select cells in another spreadsheet. I didn't want to make it too complicated because other (non-technologically savy) staff are using this as well. As it stands it's pretty much a much click function now.
    Thanks again!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •