Calculated Queries

ecorg911

Registered User.
Local time
Today, 15:25
Joined
Jan 7, 2009
Messages
14
Hi, I am currently having a few problems using Queries in MS Access 2007. I am currently trying to make the query multiply to values, although only if "value 1" is above a value of 100.

For example:

Code:
Value 1     Value 2      Result
16            23            Do not mulitply
113           7             Mulitply.

I have managed to get the two field to multiply with each other using:

Code:
Result: [Value1]*[Value2]

Although I need to instruct the query to mulitply the values only if "Value1" is above 100. Would I use an "if" statement to implement this?

Any help would be greatly appreciated.

Many Thanks.
 
Yep, it would be

Result: IIf([Value1]>100,[Value1]*[Value2],0)
 
Cheers mate, much appreciated, you've saved me a lot of time. Thanks :)
 

Users who are viewing this thread

Back
Top Bottom