query - criteria based on another row field value

techexpressinc

Registered User.
Local time
Today, 12:41
Joined
Nov 26, 2008
Messages
185
I would like this field
TRAVEL TIME VALUE: [Export_Data]![TIME-SA]

to be zero un-less another field
Activity Type_SA is eqaul to "Travel"

Anyone know how could I code this???

attached is a screen image of the query


Thanks in advance.

Russ
rneuman@ SCANINC.org
 

Attachments

  • query-criteria.JPG
    query-criteria.JPG
    40.5 KB · Views: 779
you need an IIF():
Code:
iif([sa] = "travel", [time sa], "0")
 
Adam - you are smart.
I am almost there now.
Russ
 
Can you make the a rounded number now?

See my jpeg.
Thx
Russ
 

Attachments

  • rounded needed now.JPG
    rounded needed now.JPG
    33.7 KB · Views: 427
Re: query - criteria based - Working

:DAdam - I think I got it working!!
That is a pretty heavy expression for a beginner:

TIME-SA2: Round(IIf([ACTIVITY TYPE-SA]<>"Travel",[TIME-SA],"0"),2)

Thanks for help.
Russ
 

Users who are viewing this thread

Back
Top Bottom