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

How can i create a button on a form which asks for a data/filter and then exports thi

P: 1
Hi, i am trying to create a filter almost that will export the filtered data to Excel 2010. I am a newbie but my work have asked me to create a database to store projects. I would like it so as soon as i click the button it would ask for which dates and a combo box to filter the districts. Then it would filter these results to excel? is this possible or too much to ask for?
Mar 10 '17 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,430
I believe the only way is to create a temporary table holding your filtered results, and then export it using
with the appropriate parameters.

After the export, you can delete the temporary table.

Mar 12 '17 #2

Expert 100+
P: 634
Hi All

I never use DoCmd.TransferSpreadsheet (use automation instead as I can control the look/format of the report), but I think a stored query name could be used instead of a table name. The query could then have the required Filter linked to the filter control on the form that has the DoCmd.TransferSpreadsheet.

Not sure if that helps ...

Mar 13 '17 #3

Post your reply

Sign in to post your reply or Sign up for a free account.