By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

Export access form data to existing excel sheet

P: 72
Hi,
I have the following code which works fine. It export current access form record to an excel sheet: DoCmd.OutputTo acOutputForm, "frmsubformtest", acFormatXLS, "C:\Details.xls", True

Is it posible to append data from this form to an existing template excel sheet that already have the same columns names.

thanks in advance.
May 5 '08 #1
Share this Question
Share on Google+
1 Reply


rsmccli
P: 52
Hi,
I have the following code which works fine. It export current access form record to an excel sheet: DoCmd.OutputTo acOutputForm, "frmsubformtest", acFormatXLS, "C:\Details.xls", True

Is it posible to append data from this form to an existing template excel sheet that already have the same columns names.

thanks in advance.
This is a shot in the dark, but it may help. From my understanding the OutputTo command exports the form's recordsource (a query) in its entirety to an Excel sheet. Once you create the initial .xls, to append to it you could add it as a linked table and create an append query identical to the form's recordsource and run it when needed. If you only wanted to append new records, you might have to add a "New?" flag somewhere along the line and update that to false once the new records have been appended.

Good luck to you.
May 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.