Can you Query Using Multiple criteria from same field?

rainman89

I cant find the any key..
Local time
Today, 11:42
Joined
Feb 12, 2007
Messages
3,015
Hi all,
I posted something similar to this before
http://www.access-programmers.co.uk/forums/showthread.php?t=124289
But i didnt get it figured out.

Is it possible to use the same field for multiple criteria in a query?
the one i would like to base it on is taskID.
i just want the total time to be called admin time if taskid=2 and investigative time if taskid<>2.

Ive tried it with single and multiple queries in one and am recieving errors with both. help is always appreciated!

Woohoo for 100 posts!
 
Something along the following lines should do it.

{Value of Field}: IIf(TaskId = 2, "Admin Time","Investigative Time")
 
How would i go about doing it the other way.
setting
Admin time= totaltime if task =2
investigative time= totaltime if <>2
totalTime function is
Code:
TotalTime: NZ(IIf([StartTime]<[EndTime],DateDiff("n",[StartTime],[EndTime]),1440-DateDiff("n",[EndTime],[StartTime]))/60)+(Nz([ExpenseHour]))+(Nz([ExpenseMinute]/60))
your solution works for a text but what about a # gotten from within the same query?
 
Forgive me for asking such a dumb question. i figured it out. i dont know why i couldnt before, but i was merely tryingto do this is a report and didnt need it in the query.
i just set my text box values using the =IIf([TaskID]<>2,[TotalTime],"") that u gave me.
I thank you
 

Users who are viewing this thread

Back
Top Bottom