OutputTo Excel Using Filter or Recordset

J

JoeR

I am trying to dynamically filter content from a query to
an Excel spreadsheet. Whereas the "OutputTo a report"
feature allows for a 'Where' statement, I can't find a way
that works to limit output to an Excel spreadsheet.

I want to pass a variable created from a pull down menu on
a form to the OutputTo results so that the resulting Excel
spreadsheet will only have records that match the
varialble. Below is the command I've been working with.

DoCmd.OutputTo acQuery, "QueryName", "MicrosoftExcel
(*.xls)", "", false, ""

I've tried setting up a filter and a record set--but no
success.

I appreciate any help anyone can offer on this. Don't
know if it makes a difference, but I'm using Access 2000.
 

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