RE: IIf comparison



How would I link this query to the report? I only know enough of Access to be
dangerous : )

"Trevor Mills" wrote:

> Qreate a query with the following equation
>
> Expr1: Abs(Abs([Field1])-Abs([Field2]))
>
> "Kim" wrote:
>
> > I need to write an iif statement (or something else?) that will show a result
> > where if the first field is greater in value than the second field, it will
> > subtract the first from the second. But if the first field is less in value
> > than the second field, I need to reverse the equation to avoid negative
> > results. Example -2,000 in first field minus 70,000 in the second field.
> > Needing the result to be 68,000.
> >
> > Thanks
.



Relevant Pages

  • Re: Design View Criteria question
    ... The first query will use AND logic: it will return those records for which the ... first field is equal to 123 (regardless of the value in the second field), ...
    (microsoft.public.access.queries)
  • Re: Group by (Selecting First) after Sorting
    ... You posted in the tablesdbdesign newsgroup. ... If you want a query that sorts by the first field, ... ascending order on the second field, which gives, ...
    (microsoft.public.access.tablesdbdesign)
  • Calculated fields in query
    ... I am stuck here and need some help with this one. ... The query returns the value 20 whereas it should return 0, ... as the first field value is 20 and the second field is ...
    (microsoft.public.access.queries)
  • Re: Ascending Sort Problem
    ... Create a query. ... In the first field put the following expression: ... In the second field, put this expression: ... In the third field, put this expression: ...
    (microsoft.public.access.queries)
  • Re: Max and 2nd Highest for two identifiers
    ... So for example I can get part of my work by doing a max query: ... second field), AFTER the WHERE clause made its clean up. ... results for 3002 and of coarse you would want the highest test result. ... So here is what the above data needs to look like: ...
    (microsoft.public.access.queries)