Tesc,
Behind the scenes the QBE grid is writing an SQL statement for you. To
define the sort order of a query it uses (and you can use) an ORDER BY
clause in the SELECT statement. If you want to limit the rows returned in a
result to only those that meet a set of criteria, then you would include a
WHERE clause.
So, for example, "SELECT [FIELD 1], [FIELD 2], [FIELD 3], [FIELD4], [FIELD
5], [FIELD 6] FROM TABLE1 WHERE [FIELD 1] >=0.2 OR [FIELD 2] >= 0.2 OR
[FIELD 3] >=0.2 OR [FIELD 4] >=0.2 OR [FIELD 5] >=0.2 OR [FIELD 6] >=0.2
ORDER BY [FIELD 1].
And a gripe--Naming your fields [FIELD 1], [FIELD 2], etc. is lazy & rude.
Hopefully no one else has to use the table set up this way. Hopefully the
table won't be in service long enough for you to forget what each field
contains. But bitter experience by many database administrators has taught
that failing to make the effort to name fields something sensible begets
hours of hair pulling and teeth gnashing by the users and administrators of
such a database. Make the effort to name your fields.
<te**@optonline.net> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am so aggravated and need any help I can get. I am using Access 2000
and am trying to sort multiple fields in a select query.
My query is set up as follows:
FIELD 1 FIELD 2 FIELD 3 FIELD4 FIELD 5 FIELD 6
MSA03 MSA 02 % change ICU 03 ICU 02 % change
calc. calc.
This format continues and in some queries I have up to 13 percentages
to sort. I need to sort each percentage to show over 20% increase and
have only those records with an increase show.
I've tried using >=.2 as the criteria in each percentage field, but
that doesn't give me what I need.
(I know this looks like it should have been done in Excel, but for
reporting/printing purposes it had to be done in Access.)
Any help is greatly appreciated.
Thank you