DoCmd.OutputTo used to export to Excel - Filter parameters ignored

R

RickW

My application is an ADP and I want to export all the records showing in a
Subform to Excel.

The record source of the subform is an SQL view. I use ServerFilter to
limit the records according to a combo box on the main form, and this works
fine.

However, when I run my sub based on "DoCmd.OutputTo" the result in Excel is
all rows disregarding the ServerFilter value.

I then tried to pass the whole SQL to the recordsource including a WHERE
clause instead of ServerFilter and got the same result.

Why is this happening please, and can you give me a solution??

Regards
Rick
 

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