if expression in calculated query field

Posted on 2011-10-08
Last Modified: 2012-05-12
dbse uploaded.
I want to create an expression in the Invoices query.
the expression takes a figure from the Invoices amount field and divides it by three.
if the amount field is less than £100 it leaves a string "not applicable"

can you help me with the expression
Question by:topUKlawyer

    Author Comment

    that is to say, if the invoice amount is less than £100 no one third calculation is made and the text is entered.
    LVL 19

    Accepted Solution

    Try to use this:

    calc1: IIf([invoiceAmount]<100,"Not Applicable",[invoiceAmount]/3)

    LVL 18

    Assisted Solution

    by:Richard Daneke
    Database updated. trial.accdb

    Author Comment

    Thanks guys for the quick and helpful repsonse.

    I notice both of you have put what looks like two letter I's as part of the If bstatement.

    Is this intentiional and if so what does it do/signify?

    or is it my eyesight seeing things!
    LVL 18

    Expert Comment

    by:Richard Daneke
    Iif means imediate if. Just the syntax that is used.!!!!!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Suggested Solutions

    My experience with Windows 10 over a one year period and suggestions for smooth operation
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
    The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now