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

acces 97: export multiple queries into one workbook

P: n/a
is it possible to export multiple queries into one workbook, having
each query as separate worksheet? i cannot specify a range because the
records will change on a daily basis as for query size.
i tried the following transferspreadsheet method but the database
could not find 'TFM$' because it was not a valid parameter.

DoCmd.TransferSpreadsheet acExport, 8, "TFM",
"C:\Temp\NonCritical.xls", True, "'TFM'!"
DoCmd.TransferSpreadsheet acExport, 8, "STRUCTURED",
"C:\Temp\NonCritical.xls", True, "'STRUCTURED'!"
DoCmd.TransferSpreadsheet acExport, 8, "NRT",
"C:\Temp\NonCritical.xls", True, "'NRT'!"

thanks in advance
jung
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I'm also doing this in one of my Access project.

Maybe you can just omit the last parameter from your codes, i.e., "TFM'!'",
"'STRUCTURED'!'", "'NRT'!". I don't think these are necessary. The
worksheets will have names the same as the queries that are being exported.

Herbert

"JMCN" <pi******@yahoo.fr> bl
news:27*************************@posting.google.co m g...
is it possible to export multiple queries into one workbook, having
each query as separate worksheet? i cannot specify a range because the
records will change on a daily basis as for query size.
i tried the following transferspreadsheet method but the database
could not find 'TFM$' because it was not a valid parameter.

DoCmd.TransferSpreadsheet acExport, 8, "TFM",
"C:\Temp\NonCritical.xls", True, "'TFM'!"
DoCmd.TransferSpreadsheet acExport, 8, "STRUCTURED",
"C:\Temp\NonCritical.xls", True, "'STRUCTURED'!"
DoCmd.TransferSpreadsheet acExport, 8, "NRT",
"C:\Temp\NonCritical.xls", True, "'NRT'!"

thanks in advance
jung

Nov 12 '05 #2

P: n/a
"Herbert Chan" <he*****@chan.com> wrote in message news:<40**********@rain.i-cable.com>...
I'm also doing this in one of my Access project.

Maybe you can just omit the last parameter from your codes, i.e., "TFM'!'",
"'STRUCTURED'!'", "'NRT'!". I don't think these are necessary. The
worksheets will have names the same as the queries that are being exported.

Herbert

thanks herber! you are totally correct! for some reason i thought i
needed to indicate the name of the worksheet even if i did not have a
range.
thanks again! cheers - jung
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.