<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1126" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=251063815-22042003><FONT face=Arial color=#0000ff size=2>I have
had inconsistent results with where clauses in union queries. Now I create
individual queries with the where clauses first then include the resulting
queries in a union query. This seems to work satisfactorily although queries
based on queries can quickly bog the machine down on large
recordsets.</FONT></SPAN></DIV>
<DIV><SPAN class=251063815-22042003><FONT face=Arial color=#0000ff size=2>Jim
Hale</FONT></SPAN></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> Susan Harkins
[mailto:harkins@iglou.com]<BR><B>Sent:</B> Monday, April 21, 2003 7:54
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 size=2>UNION ALL forces all records to the results.
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Susan H. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><BR> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><SPAN class=145002022-21042003><FONT face=Arial color=#0000ff
size=2>Solution:</FONT></SPAN></DIV>
<DIV><SPAN class=145002022-21042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=145002022-21042003><FONT face=Arial color=#0000ff
size=2>After I changed the query from 'UNION' to 'UNION ALL' the filter
works!!!</FONT></SPAN></DIV>
<DIV><SPAN class=145002022-21042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=145002022-21042003><FONT face=Arial color=#0000ff size=2>I
don't know if this is a quirk in my application or Access -- or maybe the
UNION ALL ensures a unique record. :-)</FONT></SPAN></DIV>
<DIV><SPAN class=145002022-21042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=145002022-21042003><FONT face=Arial color=#0000ff
size=2>Thanks for inspiring me to continue to hunt for the answer. Sometimes
I have to sleep on a problem to get the solution.</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>