[AccessD] Multiple Criteria Query

David McAfee davidmcafee at gmail.com
Fri Mar 20 17:05:18 CDT 2009


I take it by "line two" that you are talking about the QBE grid?

Can you copy the SQL statement for the query with just one line and also
copy the SQL statement when you have both lines of creieria?

Across the QBE grid is "AND"
Down the rows is "OR"

You have to make sure everything from line one is also on line two.

On Fri, Mar 20, 2009 at 2:53 PM, Keith Williamson <Kwilliamson at rtkl.com>wrote:

> Okay...am I being an absolute idiot.....or what am I doing wrong here??
>
> I have a query that I want to return all records that meet criteria on
> line ONE (in msquery) ...OR....all the records that meet criteria on
> line TWO.
>
> As long as I have the criteria (about 6 fields with criteria filters) on
> only one line....I get either set of criteria to work.  BUT...once I add
> the second set of criteria, on line two......I wind up with a TON of
> records....much more than either set alone.
>
> To try to elaborate.....I have this query where the first line of
> criteria is for all AR activity where TransType="CR", AccountType =
> "Regular",Amount <>0, Period is >2007....Invoice Number is All, Project#
> is All.
>
> It gives me 287 records.  Then...I want to add a second line of criteria
> where I am wanting it to return all TransType="CR", for Project#
> ="88-99999.09"
>
> When I add that second criteria....I get back 13,000 records.
>
> ????? Am I just being stupid....or shouldn't I be able to get the
> original 287 records...AND....the ONE record that satisfies the second
> line of criteria...for a total of 288 records???
>
> This is driving me crazy.
>
> Thanks,
>
> Keith Williamson | Associate, Asst. Controller | kwilliamson at rtkl.com
>
> RTKL Associates Inc. | 901 South Bond St. | Baltimore, MD  21231
>
> 410.537.6098 Direct | 410.276.4232 Fax | www.rtkl.com
>
> --------------------------------------------------------------------------------
> The information contained in this communication is confidential, may be
> privileged and is intended for the exclusive use of the above named
> addressee(s). If you are not the intended recipient(s), you are expressly
> prohibited from copying, distributing, disseminating, or in any other way
> using any of the information contained within this communication. If you
> have received this communication in error, please contact the sender by
> telephone at (410) 537-6000 or by response via e-mail and permanently delete
> the original email and any copies.
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



More information about the AccessD mailing list