PC Review


Reply
Thread Tools Rate Thread

calculated field with conditions

 
 
schongresh
Guest
Posts: n/a
 
      24th May 2007
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
".

 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      24th May 2007
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)


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot table, IF function, calculated item versus calculated field NomadPurple Microsoft Excel Misc 1 9th Mar 2010 03:17 PM
Using the result of a calculated field in another calculated field's expression Paul Microsoft Access 1 12th Jan 2007 09:52 AM
Using the result of a calculated field in another calculated field's expression Paul Microsoft Access Queries 3 11th Jan 2007 04:53 PM
computation of calculated field in query based on conditions anyaley Microsoft Access Queries 3 13th Dec 2006 07:10 PM
Criteria on field calculated form another calculated field Max Moor Microsoft Access Queries 1 22nd Dec 2004 08:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 PM.