Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2010

    Unanswered: Question for you...

    I am relatively new to access so please bear with me.
    I have an access database with the following fileds

    LY_Spend Months_Since_Last_Purchase
    Promotion offer:*

    The promotion offer field has the following IFF statement. [CODE]Promortion Offer: IIf([LY Spend]>=1000,0.5,IIf([LY Spend]>=400,0.25,IIf([LY Spend],0.1)))[/CODE

    In the next step I have to display all the offers that only have 50% but without using the cryteria field as in the desing view.

    Can someone help?
    Not exactly sure how to do this and am a bit stuck thank you

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    1. Please always specify which Access object you're referring to: Table, Form, Query, etc. An expression such as:
    Promortion Offer: IIf([LY Spend]>=1000,0.5,IIf([LY Spend]>=400,0.25,IIf([LY Spend],0.1)))
    more probably comes from a query.

    Also pay attention to the spelling: [Promortion Offer] and try to refrain form using spaces and other non-alphanumeric characters as well as reserved words in the names of your objects. All these can lead to errors that are sometimes hard to detect.

    2. What do you mean with:
    ... but without using the cryteria field as in the desing view.
    And what's wrong with the IIF expression?

    If you need to conditionally select rows from a table, you'll have to use a condition (or criteria) that, in SQL, can be a WHERE clause, an (INNER) JOIN... ON operation or possibly a HAVING clause.

    Please specify the structure of the table on which the query is built (columns name and data type).
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts