Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA or SQL to carry out the task

Status
Not open for further replies.

MuskyMan

Technical User
Jul 31, 2002
36
US
I need to export records to an Excel file. Currently, I'm exporting the table to Excel during the week, but this can be a pain.

I would like for the new record data to automatically go to the Excel file. I can't find any source or samples using VBA to acomplish this, I believe I need to write the code using SQL. Unless you good folks can show me how to do it using VBA!!

Thanks for the input
 
Instead of exporting to Excel (which can be a pain) why not just import directly into Excel using Data->Import External Data? Or use a query form Excel to get the data?
 
I'm exporting the table from Access to Excel weekly. I'm trying to see if there is a away of sending the record(s) straight into the excel file after the user finishes and closes the access form.

Thanks again for the help!
 
By using the query from Excel, you can set it up such that everytime you open the Excel file the query executes and Excel is updated as of that time. Otherwise, you'll need to write VB code so that "on exit" the new records are added to your Excel file. Personally I prefer the former.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top