Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

access+training+courses - calculations expressions queries

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

ResolvedVersion Standard

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?

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

Access tip:

Switchboard Startup

An option when you open your Access database that contains all of you tables, forms and queries is only the switchboard is displayed.

To achieve this, select Tools click on Startup. On the right hand side of the Startup screen you are able to select which form you want to open when you open you Access Database. Once you have selected this, there is a check box just below that says "Display Database Window", you need to uncheck this option. Then click ok.

Then when you close you Access database and re open it, the database should open with just the switchboard being shown


View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.