Advanced Filter Won't Unfilter

N

Nucleo

Hi, using Mail merge to query a view on a MSSQL server. the advanced
filter works fine. Do the mail merge and no problem.

Back to the main merge document, i want to change the filter, but the
filtered data is still there, and i can only filter the filtered data
=S

To get back to showing all of the data, i have to re-open the
connection file to get the data back...

So, is there a way to make the filter un filter itself? without having
to re-open the connection?

Thanks
 
P

Peter Jamieson

Yes, this is an irritating problem.

As far as I know, all you can do is
a. change the filter to one that includes everything (e.g. if you are
filtering on Country, Country > '' might get you all the records back, but
there will still be a filter, which may for example affect performance or
result in records with null values being excluded.
b. go into the VBA Editor and, for example, use the Immediate Window to
set, for example

ActiveDocument.MailMerge.DataSource.QueryString = "SELECT * FROM
""tablename"""

However, that's probably harder than going through the connection process
again.

Peter Jamieson
 
N

Nucleo

your probably right =)


i think i will stick with just re-opening the connection.

with any luck, the client will only use the mail merge doc, then close
it, then re-open later.

thanks for the heads up

Nuc
 

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