Results 1 to 2 of 2
  1. #1
    bimcompu is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    7

    Export Recordset to Excel

    I am hoping that you Guys can help me once again. I followed the link to Ken Snell's automation with Excel and used:
    Write Data From a Recordset into an EXCEL Worksheet using Automation (VBA)
    Of course I had to change a few things to get it to work for my application but ran into a snag. In my query for the table data I wish to export I have a variable linked to a form. When I try to run the query using that set of instructions I get the dreaded "Runtime 3061" error. If I hard code the variable it runs fine. Is there a way to be able to pass the variable into this code so that it runs?

    Thanks for all of your efforts

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Would have to see the code, but it sounds like you have the variable inside of quotes.

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

Similar Threads

  1. Replies: 7
    Last Post: 04-25-2013, 03:47 PM
  2. From Recordset to excel sheet
    By mark71 in forum Programming
    Replies: 1
    Last Post: 12-10-2012, 03:40 PM
  3. Export Data w/FSO - Open object recordset failed
    By JayZoll in forum Programming
    Replies: 1
    Last Post: 11-12-2012, 01:38 PM
  4. Replies: 3
    Last Post: 10-07-2011, 07:49 AM
  5. Export table to excel using excel template
    By allenjasonbrown@gmail.com in forum Programming
    Replies: 1
    Last Post: 06-27-2011, 02:10 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