Force the order of criteria statements

C

Chris Brotz

Is there a way to force the order when multiple criteria statements are used
in a query?

For example:

Name Plan Date

John Doe 25 5/7/03
Jane Smith 25 6/6/03
Jane Smith 23 8/4/03

If I select criteria for Plan of 25 and DMax for date, I get the 8/4/03
date, but I actually want all the 25 plan types first.....I have been just
creating a separate table and stripping off the 25 plan type first so the
two statements work in sequence, but this seems rather time consuming.....

Thank you!
 
L

Larry Daugherty

Hi Chris,

I don't know your mode of accessing the newsgroups so I can only guess what
might work for you. Some people download everything in the newsgroup and
then mark as read and subsequently delete everything in which they no longer
have an interest. Another way is to leave everything on the mail server and
scan thru the newsgroup when they're on line. You can also set your view to
hide read messages.

Anyway, I still see my last response to you on 4 August titled "Re: Force
the order of criteria statements". I'm going to post this there as well as
sending it to you. If you are unable to get it into view then start a new
thread and I or someone will pick it up.

The whole idea of the newsgroups is that people can ask questions in the
newsgroups and that others may answer them there. By keeping everything in
the newsgroups the original posters benefit as well as hundreds of lurkers
who can also observe the thread and learn something or contribute something.
You may see my name frequently in the Access newsgroups but I also read lots
of threads without comment. You'd be surprised at how much I've learned
that way. Lots of things that come up in the newsgroups only later find
their way into books. It might be worth your while to go to
http://mvps.org/access and look up "netiquette".

When you do post back, give the detail of the order of your columns in the
QBE grid and any special operations you might have going. For what it's
worth, get rid of the DMax function. Given what I see, the highest date
wouldn't show in your results because you only want the "25"s. If you sort
the date field descending the highest date will come out on top. If you
only want that highest date then you need to go to SQL view in the Query
Wizard and enter "TOP 1" in your SQL statement. Look up TOP in Access help
to understand what's happening.

It's very doubtful that you'd need a 2nd table and multiple operations.
If I've misread what you're trying to do, post back with the single result
line you want to get.

hth
-Larry-


-----Original Message-----
From: (e-mail address removed) [mailto:[email protected]]
Sent: Wednesday, August 13, 2003 08:22
To: (e-mail address removed)
Subject: Re: Force the order of criteria statements


Hi Larry,

I tried using Like "25" and it did not change the order of the criteria
statements. I am not sure how to continue this "thread" without
posting a new question, but I would be interested in your response.
Please advise.

Thank you,
Chris

Larry Daugherty said:
In the QBE grid in the criteria line for Plan enter Like "25".

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top