In news:(E-Mail Removed),
schongresh <(E-Mail Removed)> wrote:
> In the query design view I am trying to make a calculated field total
> certain amounts based upon the contents of a certain field. The
> statement reads:
>
> IIf([recShortName]<>"sm/TRACTORS" Or "sm/WASH ALL TRAILERS" Or
> [recShortName] Not Like "bnsf*",Nz([bilUnit1],0)+Nz([bilUnit2],
> 0)...etc.,0)
>
> The field is calculating in each record whether or not recShortName
> matches or not. I would like some guidence on how to arrange to
> statement with the proper syntax and logic.
>
> The goal is to find to records where [recShortName] does not equal
> "sm/ TRACTORS" or "sm/WASH ALL TRAILERS" or does not contain the text
> "bnsf ".
IIf(([recShortName]<>"sm/TRACTORS" And
[recShortName]<>"sm/WASH ALL TRAILERS")
Or [recShortName] Not Like "*bnsf*",
Nz([bilUnit1],0)+Nz([bilUnit2],0)...etc.,
0)
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)