[AccessD] Fwd: Multiple Criteria Query

David McAfee davidmcafee at gmail.com
Tue Mar 24 13:05:17 CDT 2009


I was going to say make sure they are all copied down in the QBE grib as
Gary suggested:

In the example below (pretend it is the criteria in a QBE grid), all records
with either Blue Squares or any colored rectangle would be returned
Field:    Color   Shape
Criteria: Blue    Square
Criteria:            Rectangle

In the example below, all records with either Blue Squares or any red
rectangles would be returned (red squares and blue rectangle would be
filtered out)
Color   Shape
Blue    Square
Red     Rectangle


In the example below, all records with either Blue or red Squares or
rectangles would be returned (any other color or shape would be filtered
out)
Color                    Shape
IN("Blue", "Red")    Square
IN("Blue", "Red")    Rectangle



HTH
David




On Tue, Mar 24, 2009 at 10:47 AM, Keith Williamson <Kwilliamson at rtkl.com>wrote:

> Gary,
>
> This is what I wound up doing.  I can't figure out why the two lines
> don't give the proper results.  I won't up creating additional "IIF
> Statement" fields, for the dissimilar criteria....each returning the
> result of "Allow", if the appropriate criteria is met.  I created these
> for only those fields that would NOT be the exact same criteria input,
> on the separate lines.  For all the fields that are exactly the same,
> for either criteria.... I left alone.  NOW....my two criteria lines are
> exactly the same, except for the two criteria fields I added.  "Allow"
> under the 1st Criteria Field, on line ONE....and "Allow" under the 2nd
> Criteria Field, on line TWO.
>
> It all appears to work now.......just weird.
>
> 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
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gary Kjos
> Sent: Monday, March 23, 2009 11:45 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Fwd: Multiple Criteria Query
>
> I sometimes have better luck with splitting the selection criteria
> into it's own column separate from teh group by in the Query Design
> grid. Drag the field down twice and in one do the normal group by and
> in the other do a where. Might jsut be superstition on my part.
>
> You should be able to do what you are trying to do. Things that are on
> the same line across in the query criteria grid should create AND
> conditions and things that go down should create OR conditions. You
> might need to repeat some of the things from one line on the second
> line. The other thing to look out for is that there is another
> condition line there that you don't see as that baby will SCROLL on
> you without you noticing sometimes.
>
> Good luck with it. A new day, a new week, I bet the solution JUMPS out
> at you today!  Power of postitive thinking ;-)
>
> GK
>
> On Sun, Mar 22, 2009 at 4:15 PM, Keith E. Williamson
> <keith at williamson5.name> wrote:
> > Thanks a lot, David.
> >
> > I'll try that, when I get back into the office, tomorrow. I appreciate
> > your time, on this.
> >
> > BTW...the ---Mid([Invoice],4,4) IN
> >
> > ("8888","9999","0999")--- Was left out on purpose...as I am looking
> for
> > ALL invoices in the second select statement.
> >
> > Thanks,
> >
> > Keith W.
>
> --
> Gary Kjos
> garykjos at gmail.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.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