Results 1 to 8 of 8
  1. #1
    cslr is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2011
    Posts
    19

    need to send to querie to excel

    ok i have tried a couple of things . First i know how to export a table or report to excel using macros but i really need to be able to do this with a querie. i don't se any way to do this i do not know how to prgram VBA so i am stuck their . thanks for any help any one can give me .

  2. #2
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    Other than right clicking on the query and saying 'export' and choosing excel, you have to fire the transfer spreadsheet commands either through a macro or vba code as far as I know. Unless there is some 'on open' property of the query itself that lets you fire the transfer spreadsheet command at that time...

  3. #3
    cslr is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2011
    Posts
    19
    yes i see that i can use the right click or go into file and select export . what i need to be able to do and this is were i am very stuck is automate it . use a click of a button to send it excel . the people who will be using this needs it to be very easy .
    thanks for your input.

  4. #4
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    Ok - so create a form that has a button on it. Use the button to fire the macro that exports the data...

  5. #5
    cslr is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2011
    Posts
    19
    that is the part i am stuck on building the macro to do that . i have looked and looked and can not seem to figure that out . i have a macro that can send a table but can not figure out how to send a form data or querie

  6. #6
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    Create the macro, might have to "show all actions" (can't remember..), use the ImportExportSpreadsheet (2010) option, set it to Export, give it the table or query name, give it the file name, choose whether or not you want it to have field names, and provide the range (leave it blank for all).

    Save it, then call it from the form.

  7. #7
    cslr is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2011
    Posts
    19
    yes the problem is this is on office 2003 i see on the newer version it is easy to do .

  8. #8
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    You can do the same thing in VBA behind the button - I believe in the macro its the transferspreadsheet command (2003).

    For a vba example look at http://www.access-programmers.co.uk/...d.php?t=188472

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need a querie that updates.
    By imlost2 in forum Queries
    Replies: 1
    Last Post: 08-20-2011, 09:06 AM
  2. Add A Querie to the Report
    By BowBeforeMeMySlave in forum Reports
    Replies: 3
    Last Post: 02-10-2011, 09:27 AM
  3. Number querie
    By Rigsby in forum Queries
    Replies: 3
    Last Post: 02-08-2011, 06:41 AM
  4. update querie
    By frcastro in forum Queries
    Replies: 1
    Last Post: 06-23-2010, 04:20 AM
  5. querie problem
    By TIMT in forum Queries
    Replies: 2
    Last Post: 05-31-2009, 10:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums