How can you generate an Excel file from a query that has parameter

M

mr3316a

In Access 2007, I am currently using the following code to generate an excel
file from a normal select query and it work fine.
In my code, I am building parts of the statement based on data that is
stored in tables.
"s" = a string that represents the name of the query
"p" = a concatenated string that represents the files Path, files Name,
and files extention

DoCmd.OutputTo acOutputQuery, s, acFormatXLS, p, False

My question is what would the code be if the query needed to have parameters
passed in?

Can anyone help me with this?
 
M

mr3316a

Thanks for your help!
I found you app very interesting, and it gave me a lot of ideas, in
particular instead of gerneration mulipule spreadsheets that I would have to
then create attachments to an e-mail, create 1 spreadsheet with multiples
tabs 1 for each report. Then only have 1 attachment.
Thanks again
Mark
 

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