<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=621032102-19042003><FONT face=Arial color=#0000ff size=2>I
trimmed the RepNum field in both the Select queries used in the Union
query.</FONT></SPAN></DIV>
<DIV><SPAN class=621032102-19042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=621032102-19042003><FONT face=Arial color=#0000ff size=2>I can
'Filter By Selection' in either of the Select queries. But when I try the same
'Filter By Selection' in the Union query, it returns no
records.</FONT></SPAN></DIV>
<DIV><SPAN class=621032102-19042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=621032102-19042003><FONT face=Arial color=#0000ff size=2>I
found others with the same trouble in Google Groups. (Seached on 'Filter By
Selection' and 'union query'.) Very strange.</FONT></SPAN></DIV>
<DIV><SPAN class=621032102-19042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=621032102-19042003><FONT face=Arial color=#0000ff size=2>Susan
and Jim: Thanks for your suggestions.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>Jim Lawrence
(AccessD)<BR><B>Sent:</B> Friday, April 18, 2003 10:05 PM<BR><B>To:</B>
accessd@databaseadvisors.com<BR><B>Subject:</B> RE: [AccessD] Union Query
WHERE Bug?<BR><BR></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN class=550304801-19042003>Hi
Myke:</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN
class=550304801-19042003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN class=550304801-19042003>The
only reason is because the field with the number string has a space or another
invisible character in the field.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN class=550304801-19042003>the
'like' operand will return any string with '8222' any where in it. If the
field was five characters in size it could return
three possiblities of '8222 ' or ' 8222' or
'8222'.</SPAN></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#000080>WHERE
(((quniCEIncompleteCredits.RepNum) Like "8222"));</FONT><SPAN
class=921022018-18042003><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><SPAN class=921022018-18042003><SPAN
class=921022018-18042003></SPAN></SPAN></FONT></FONT><FONT size=2><FONT
face=Arial color=#000080><SPAN class=921022018-18042003><SPAN
class=921022018-18042003></SPAN></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN
class=921022018-18042003><SPAN class=921022018-18042003><SPAN
class=550304801-19042003>you could try, to remove
spaces:</SPAN></SPAN></SPAN></FONT></DIV>
<DIV><FONT color=#000080><SPAN class=921022018-18042003><SPAN
class=921022018-18042003><SPAN class=550304801-19042003>
<DIV><SPAN class=921022018-18042003><FONT face=Arial><FONT size=2>WHERE
(((<SPAN
class=550304801-19042003>trim(</SPAN>quniCEIncompleteCredits.RepNum<SPAN
class=550304801-19042003>)</SPAN>)="8222"));<SPAN
class=921022018-18042003><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=921022018-18042003><FONT face=Arial><FONT color=#0000ff
size=2><SPAN class=921022018-18042003></SPAN></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=921022018-18042003><FONT size=+0><FONT face=Arial
color=#0000ff size=2><SPAN class=921022018-18042003><SPAN
class=550304801-19042003>HTH</SPAN></SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=921022018-18042003><FONT size=+0><FONT face=Arial
color=#0000ff size=2><SPAN class=921022018-18042003><SPAN
class=550304801-19042003>JIm</SPAN></SPAN></FONT></FONT></SPAN></DIV></SPAN></SPAN></SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of </B>Myke
Myers<BR><B>Sent:</B> Friday, April 18, 2003 12:53 PM<BR><B>To:</B>
accessd@databaseadvisors.com<BR><B>Subject:</B> [AccessD] Union Query WHERE
Bug?<BR><BR></FONT></DIV>
<DIV><FONT face=Tahoma size=2><SPAN class=921022018-18042003>Can anyone
explain why this query returns one record, as it
should...</SPAN></FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT color=#000080><FONT face=Arial><FONT size=2>SELECT
quniCEIncompleteCredits.*<BR>FROM quniCEIncompleteCredits<BR>WHERE
(((quniCEIncompleteCredits.RepNum) Like "8222"));<SPAN
class=921022018-18042003><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT color=#000080><FONT face=Arial><FONT size=2><SPAN
class=921022018-18042003></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT color=#000080><FONT face=Arial><FONT size=2><SPAN
class=921022018-18042003><FONT color=#ff0000>And this query returns no
records?.</FONT> </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2></FONT> </DIV>
<DIV><FONT color=#000080><FONT face=Arial><FONT size=2>SELECT
quniCEIncompleteCredits.*<BR>FROM quniCEIncompleteCredits<BR>WHERE
(((quniCEIncompleteCredits.RepNum)="8222"));<SPAN
class=921022018-18042003><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT color=#000080><FONT face=Arial><FONT size=2><SPAN
class=921022018-18042003></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial color=#000080 size=2></FONT> </DIV>
<DIV><SPAN class=921022018-18042003><FONT face=Arial color=#000080
size=2>Using Access 2000. 'quniCEIncompleteCredits' is a union
query.</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#000080 size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN
class=921022018-18042003>TIA,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2></FONT> </DIV>
<DIV><STRONG><FONT face=Arial><FONT color=#000080><FONT
size=2>Myke</FONT></FONT></FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial><FONT color=#000080><FONT size=2>The Better
Information Group</FONT></FONT></FONT><FONT size=2><FONT color=#000080><FONT
face=Arial></FONT></FONT></STRONG></FONT></DIV>
<DIV>
<DIV><STRONG><FONT face=Arial color=#000080
size=2></FONT></STRONG></DIV></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>