access+training+courses - calculations expressions queries
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » access+training+courses - Calculations (expressions) in queries

access+training+courses - Calculations (expressions) in queries

resolvedResolved · Low Priority · Version Standard

replyReply Wed 23 May 2007, 10:44Delegate Sin said...

Sin has attended:
Access Intermediate course
Access Advanced course
Access VBA course

Calculations (expressions) in queries

I have a query with three with three amounts: Ammount 1, 2 & 3. I want to build a calculation in a fourth column that says that if the total from these three is 0, then put the word yes in this 4th column, and if the cumulative total is greater than 0, then put the word No in the 4th column. How do I do this?

For upcoming training course dates see: Pricing & availability

replyReply Thu 24 May 2007, 16:42Trainer Richard said...

RE: calculations (expressions) in queries

Hi

You can use the IIF function to do this.
Add the below to a new field name in your query.

Expr1: IIf([result]>=0,"Yes","No")


You might need to adapt it to your purpose but essentially:

for example, embed another IIF statement in the false answer part of the statement.

Expr1: IIf([result]=0,"Yes",IIf([result]>0,"Yes","No"))

That should work

Regards

Richard

 


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard