transferspreadsheet

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
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top