how do i get the minimum value between two fields in the query tab

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i'm using ms access 2000. in my database, i have created one query table
named compare. there are two fields contains the value 100 and 90. my
question is, how can i get the minimum value between two fields? in the other
word, how to compare both values to get the minimum one. in my case, i want
to know how to get the value 90 because 90 is smaller than 100. and then put
the value 90 in the other field name fuzzymark in the same query table.

hope you can help me..
 
Yesenia,

Use a calculated field in the query, like this...
Fuzzymark: IIf([SecondField]>[FirstField],[FirstField],[SecondField])
 
i'm using ms access 2000. in my database, i have created one query table
named compare. there are two fields contains the value 100 and 90. my
question is, how can i get the minimum value between two fields? in the other
word, how to compare both values to get the minimum one. in my case, i want
to know how to get the value 90 because 90 is smaller than 100. and then put
the value 90 in the other field name fuzzymark in the same query table.

hope you can help me..

There is no such thing as a "query table".

A Table stores data.

A Query can be based on one or more tables, and dynamically creates a
recordset based on the records and fields that you include in the
query design. Note that editing or changing the value in a Query
changes that field in the underlying Table - the query has no
independent existance.

In order to display the lesser of fields FieldA and FieldB, you can
type an expression in a vacant Field cell of the query grid:

Fuzzymark: IIF([FieldA] < [FieldB], [FieldA], [FieldB])

John W. Vinson[MVP]
 

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

Back
Top