Query with "*" returns expected results in Access, but not in Word

G

Guest

My query has several fixed filters and one using "NOT RIF*". The results I
get when I run it in Acess are correct and expected. When I use that same
query to mail merge in Word, the "*" records are included. How do I fix this
so that the merge run lwith the data in the Access query run?
 
J

Jeff Boyce

Maria

I don't understand your data, so I have to wonder how Not RIF* is working
for you. If you use a wildcard character (*) in a selection criteria, I
believe you need to use the term "Like", as in:

Not Like RIF*

Can you provide a bit more detail on how you are "searching" in Word?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Sorry for the vagueness.... the criteria in the query reads "Not Like "RIF*"
and when run any records with RIF in it do not show -- which is what I
expected. When I merge that query into MSWord, the merge recipients include
those records with RIF in the record. I hadn't expected, nor wanted, THAT
result. Is it the fact that I used a wildcard.
 
J

Jeff Boyce

Maria

A minor point ... "Not Like RIF*" will find records for which that field
does not START with "RIF". If you wish to exclude any row that CONTAINS
"RIF" somewhere in the field, use:

Not Like *RIF*

I'm not sure why using the same query from within Word returns "RIF" rows.
How are you "merging" that query into Word?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Thanks for the reminder about the wildcard before and after. In this
particular scenario, the records all begin with RIF. It baffles me though
that the merge (yes, through Word) is returning the RIF rows. My only
thought is that the "*" does not cross over from Access query to Word data
recipients. Any other thoughts?
 
J

Jeff Boyce

Again, I'm not clear on how you are migrating the query to Word.

In one of my apps, I use Access to write a text file (a Word data file).
Then I open the Word merge document. This way, what is available is only
what Access has exported out to the text file.

Are you using a query from within Word? Perhaps you could re-create the
query from within Word...

Good luck!

Jeff Boyce
Microsoft Office/Access MVP
 

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