transferspreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using 'transferspreadsheet' for the first time, as a want to export two
or 3 queries to an excel spread sheet with i.e. query 1 going into Sheet 1 of
the excel spread sheet query 2 into sheet 2 and so on, but i am having
trouble exporting just 1, also can you export queries or is this only
possible with tables?

DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel9,"tbl all data",
"\\Career2ksrv02\users\steve\access test",true,,

Please help
 
you left out the first argument, TransferType. it is an optional argument,
but the default is Import, so if you want to export you must declare the
type excplicitly. see the TransferSpreadsheet Method topic in VBA Help for
details.

hth
 
Back
Top