Exporting to Excel spreadsheet template

ladivapr

Registered User.
Local time
Today, 20:49
Joined
Jul 15, 2003
Messages
28
Is it possible I can have a record open in a form and export that data to a excel template spreadsheet? If so what is the easiest way to do it because im in a beginner level. I will appreciate so much guys!!

diva
 
Excell

You can use a macro to transfer your data to a spread sheet. Use the 'transferspreadsheet' command.
 
You can only transfer data from a table using the transferspreadsheet command when exporting any data. A solution for your problem would be to create a query with all of the fields that you require to be exported and in the criteria of your PK in the query enter the following:
Code:
Forms!YourFormname!YourPKField

Save the query then add a command button to your existing form and use the following code:
Code:
Docmd.outputto acoutputquery, "QueryName"
By using the above code Access will ask you the format you want to export the current record and where you want to save the file, you can alternatively add these to the docmd.outputto command in VBA.

Hope this Helps

Andy
 

Users who are viewing this thread

Back
Top Bottom