[AccessD] Fwd: Multiple Criteria Query

Gary Kjos garykjos at gmail.com
Tue Mar 24 13:12:09 CDT 2009


Well at least you have a work around.

I'd look closely at the NOT criteria. It's been my experience that NOT
is a trouble maker. And this goes all the way back to my COBOL
programming days. Especially when you have a NOT and an AND or an OR
involved.

I've gotten to the point where I do a lot of layered queries now too.
Do one to select the stuff you want and then use that as input to a
second query to do the grouping or final results.

Glad you got your results.

GK

On Tue, Mar 24, 2009 at 12:47 PM, 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
>



-- 
Gary Kjos
garykjos at gmail.com




More information about the AccessD mailing list