Recordsetcopy Access to Excel

M

MacDermott

Working in Access (2003), I've used Automation to create an instance of
Excel, and its recordsetcopy method to copy a large DAO recordset to an
Excel spreadsheet. However, I'm only getting several hundred of the several
thousand records I need; it's throwing an error -2147417851 or -2147467259,
neither of which comes with any useful message.

Any ideas, anybody?
- Turtle
 
M

MacDermott

Found the answer, I think!
following a suggestion of Van T. Dinh in
microsoft.public.access.modulesdaovba, I put some code in to make sure the
recordset completed before I started the transfer. What I used was
rst.MoveLast. Works like a charm!

HTH
T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top