Problems using "Like" in query feeding Mail Merge Document

G

Guest

Has something changed in Access 2003 using "Like" in criteria of a query that
feeds a Word MailMerge document? I have several queries that use, for
example,
Like "CPS*"
as criteria and have worked fine in the past. Since upgrading to Office
2003, we are finding where queries that use Like in criteria return NO
results in Mail Merge Documents in Word. In Access, the query runs fine and
returns the correct results....only when feeding a Word MailMerge document
does in not show any records.

In a few cases, I could change the criteria to use < or > criteria and get
the correct results for the document, but some are not that simple.

Any ideas on what is different now....is there a setting somewhere to fix
this?
Thanks for any help!!
Susan
 
D

David Lloyd

Susan:

The following KB article and information for MS Access help may be useful to
you. I have not tested a mail merge based on this information, but it may
be applicable to what you are seeing.

http://support.microsoft.com/default.aspx?scid=kb;en-us;234525

From MS Access Help (Under Jet Reference, Overview, Comparison of Microsoft
Jet SQL and ANSI SQL):

Microsoft Jet SQL supports both ANSI SQL wildcard characters and Microsoft
Jet-specific wildcard characters to use with the Like operator. The use of
the ANSI and Microsoft Jet wildcard characters is mutually exclusive. You
must use one set or the other and cannot mix them. The ANSI SQL wildcards
are only available when using Jet 4.X and the Microsoft OLE DB Provider for
Jet. If you try to use the ANSI SQL wildcards through Microsoft Access or
DAO, then they will be interpreted as literals. The opposite is true when
using the Microsoft OLE DB Provider for Jet and Jet 4.X.

Matching character Microsoft Jet SQL ANSI SQL
Any single character ? _
(underscore)
Zero or more characters * %

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Has something changed in Access 2003 using "Like" in criteria of a query
that
feeds a Word MailMerge document? I have several queries that use, for
example,
Like "CPS*"
as criteria and have worked fine in the past. Since upgrading to Office
2003, we are finding where queries that use Like in criteria return NO
results in Mail Merge Documents in Word. In Access, the query runs fine and
returns the correct results....only when feeding a Word MailMerge document
does in not show any records.

In a few cases, I could change the criteria to use < or > criteria and get
the correct results for the document, but some are not that simple.

Any ideas on what is different now....is there a setting somewhere to fix
this?
Thanks for any help!!
Susan
 
J

John Vinson

Has something changed in Access 2003 using "Like" in criteria of a query that
feeds a Word MailMerge document? I have several queries that use, for
example,
Like "CPS*"

It's possible that you're using an ADO recordset - try using % as a
wildcard instead of *.

John W. Vinson[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