Exporting a query to excel

LEE hepworth

Registered User.
Local time
Today, 21:28
Joined
Nov 14, 2003
Messages
23
Hi all
Need some help using Access 97 and what I want to do is on a form have a command button and using the on Click export all the records from the query called All Sales into a present excel sheet called Sales without any headers. Using The transferSpreadsheet Method, Where AM I GOING Wrong?


DoCmd.TransferSpreadsheet acExport, "All Sales", "C:\Excel\My Documents\Sales", True, "a1:g12"

Ta
 
You don't say what your problem is but I will point out that you CANNOT specify a target range on export. The help entry does point this out.
 

Users who are viewing this thread

Back
Top Bottom