Reply
 
Thread Tools Display Modes
  #1   Report Post  
Gary Stark
 
Posts: n/a
Default Mailmerge Query - Works in Access; fails in Word

Is there an issue with the LIKE statement in a query in Access when it's
applied to a mailmerge query from Word?

I have a problem at a client location, and I'm not able to reproduce the
issue on my own systems. XPPro, Word and Access 2003 is the environment, and
within Access I have a query that includes a criteria

LIKE "*G05*"

against a field in the database.

In Access, the query works correctly and returns 25 records from a database
of almost 2000 records.

On the same system, when I go into Word and specify the database/query in
preparation for a mailmerge, there are no records selected or displayed.

Using the same query back in Access, if I remove that criteria, the query
now returns the full complement of records in the table, and then reloading
the query in Word also now sees the query working correctly.

Similarly, feeding a simple criteria against a different field (= "US")
works under both applications, so it seems as if it comes back to some sort
of issue, perhaps related to the LIKE statement, and how it translates
through to the Word document and its query aghainst the database.

Has anybody seen something like this before?

Are there any workarounds that can be used?


  #2   Report Post  
Gary Stark
 
Posts: n/a
Default

Anyone ??



"Gary Stark" wrote:

Is there an issue with the LIKE statement in a query in Access when it's
applied to a mailmerge query from Word?

I have a problem at a client location, and I'm not able to reproduce the
issue on my own systems. XPPro, Word and Access 2003 is the environment, and
within Access I have a query that includes a criteria

LIKE "*G05*"

against a field in the database.

In Access, the query works correctly and returns 25 records from a database
of almost 2000 records.

On the same system, when I go into Word and specify the database/query in
preparation for a mailmerge, there are no records selected or displayed.

Using the same query back in Access, if I remove that criteria, the query
now returns the full complement of records in the table, and then reloading
the query in Word also now sees the query working correctly.

Similarly, feeding a simple criteria against a different field (= "US")
works under both applications, so it seems as if it comes back to some sort
of issue, perhaps related to the LIKE statement, and how it translates
through to the Word document and its query aghainst the database.

Has anybody seen something like this before?

Are there any workarounds that can be used?


  #3   Report Post  
Doug Robbins
 
Posts: n/a
Default

As you said yourself, you cannot reproduce the problem on another system.
It therefore makes it impossible for anyone else to try and debug without
access to the actual system that exhibits the problem.

As an alternative to using LIKE (which as far as I can tell, is NOT a
"Built-In Function" in Access, so I would have to assume that it is a "User
Defined" function), you might try to select the records that you want by
using a combination of the Mid() and Instr() functions.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Gary Stark" wrote in message
...
Anyone ??



"Gary Stark" wrote:

Is there an issue with the LIKE statement in a query in Access when it's
applied to a mailmerge query from Word?

I have a problem at a client location, and I'm not able to reproduce the
issue on my own systems. XPPro, Word and Access 2003 is the environment,
and
within Access I have a query that includes a criteria

LIKE "*G05*"

against a field in the database.

In Access, the query works correctly and returns 25 records from a
database
of almost 2000 records.

On the same system, when I go into Word and specify the database/query in
preparation for a mailmerge, there are no records selected or displayed.

Using the same query back in Access, if I remove that criteria, the query
now returns the full complement of records in the table, and then
reloading
the query in Word also now sees the query working correctly.

Similarly, feeding a simple criteria against a different field (= "US")
works under both applications, so it seems as if it comes back to some
sort
of issue, perhaps related to the LIKE statement, and how it translates
through to the Word document and its query aghainst the database.

Has anybody seen something like this before?

Are there any workarounds that can be used?




  #4   Report Post  
Gary Stark
 
Posts: n/a
Default

Doug,

Thanx for the response.

"Doug Robbins" wrote:

As you said yourself, you cannot reproduce the problem on another system.
It therefore makes it impossible for anyone else to try and debug without
access to the actual system that exhibits the problem.


Hence my question was framed so as to try to determine if there's an issue
with the term LIKE.


As an alternative to using LIKE (which as far as I can tell, is NOT a
"Built-In Function" in Access,


Actually, it appears that this is standard for Access.

In design view, in Access, for the field in question, if we just ype in into
the criteria section *G05* and then leave that section, Access automagically
completes the criteria by adding a pair of quotes around the value that we're
testing, and at the same time it inserts the word LIKE before the value

..
so I would have to assume that it is a "User
Defined" function),


See above; not at all.

you might try to select the records that you want by
using a combination of the Mid() and Instr() functions.


Perhaps; thanx for the suggestion.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Gary Stark" wrote in message
...
Anyone ??



"Gary Stark" wrote:

Is there an issue with the LIKE statement in a query in Access when it's
applied to a mailmerge query from Word?

I have a problem at a client location, and I'm not able to reproduce the
issue on my own systems. XPPro, Word and Access 2003 is the environment,
and
within Access I have a query that includes a criteria

LIKE "*G05*"

against a field in the database.

In Access, the query works correctly and returns 25 records from a
database
of almost 2000 records.

On the same system, when I go into Word and specify the database/query in
preparation for a mailmerge, there are no records selected or displayed.

Using the same query back in Access, if I remove that criteria, the query
now returns the full complement of records in the table, and then
reloading
the query in Word also now sees the query working correctly.

Similarly, feeding a simple criteria against a different field (= "US")
works under both applications, so it seems as if it comes back to some
sort
of issue, perhaps related to the LIKE statement, and how it translates
through to the Word document and its query aghainst the database.

Has anybody seen something like this before?

Are there any workarounds that can be used?





  #5   Report Post  
Doug Robbins
 
Posts: n/a
Default

I stand corrected on the LIKE. My comment was based on it not appearing in
the list of Built-In Functions.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Gary Stark" wrote in message
...
Doug,

Thanx for the response.

"Doug Robbins" wrote:

As you said yourself, you cannot reproduce the problem on another system.
It therefore makes it impossible for anyone else to try and debug without
access to the actual system that exhibits the problem.


Hence my question was framed so as to try to determine if there's an issue
with the term LIKE.


As an alternative to using LIKE (which as far as I can tell, is NOT a
"Built-In Function" in Access,


Actually, it appears that this is standard for Access.

In design view, in Access, for the field in question, if we just ype in
into
the criteria section *G05* and then leave that section, Access
automagically
completes the criteria by adding a pair of quotes around the value that
we're
testing, and at the same time it inserts the word LIKE before the value

.
so I would have to assume that it is a "User
Defined" function),


See above; not at all.

you might try to select the records that you want by
using a combination of the Mid() and Instr() functions.


Perhaps; thanx for the suggestion.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Gary Stark" wrote in message
...
Anyone ??



"Gary Stark" wrote:

Is there an issue with the LIKE statement in a query in Access when
it's
applied to a mailmerge query from Word?

I have a problem at a client location, and I'm not able to reproduce
the
issue on my own systems. XPPro, Word and Access 2003 is the
environment,
and
within Access I have a query that includes a criteria

LIKE "*G05*"

against a field in the database.

In Access, the query works correctly and returns 25 records from a
database
of almost 2000 records.

On the same system, when I go into Word and specify the database/query
in
preparation for a mailmerge, there are no records selected or
displayed.

Using the same query back in Access, if I remove that criteria, the
query
now returns the full complement of records in the table, and then
reloading
the query in Word also now sees the query working correctly.

Similarly, feeding a simple criteria against a different field (=
"US")
works under both applications, so it seems as if it comes back to some
sort
of issue, perhaps related to the LIKE statement, and how it
translates
through to the Word document and its query aghainst the database.

Has anybody seen something like this before?

Are there any workarounds that can be used?







Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The WordPerfect "Reveal Codes" method is so much easier to use. Torden Microsoft Word Help 8 April 19th 10 07:50 PM
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM
Wordperfect Office 2000 conversion to Word 2003 MikeE New Users 1 March 21st 05 12:04 AM
Boiletplates from Word Perfect linda Microsoft Word Help 1 January 28th 05 05:37 PM


All times are GMT +1. The time now is 01:41 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"