Question about queries

S

schongresh

I am trying to query a database that will include building some
calculated fields. I am having trouble with the conditions I am trying
to place on the calculations. An example is: IIf([recShortName]<>"sm/
WASH TRACTORS" OR "sm/WASH ALL TRAILERS" OR [recShortName] Not Like
"bnsf*", Nz([bilUnit1],0)+Nz([bilUnit2,0),0)

If the records recShortName is not "sm/WASH TRACTORS" OR "sm/WASH
ALL TRAILERS" OR does not contain the text "bnsf" then I want to add
the fields bilUnit1, bilUnit2, etc. The way I have it written above is
obviously incorrect, because the calculated field is adding the fields
for each record. Please help me straighten out the conditions I am
trying to place on the calculated fields.

Thanks So Much
 
C

Cheese_whiz

Shouldn't it be AND [recShortName] Not Like.....
(didn't look for other errors)
CW
 

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

Top