Results 1 to 4 of 4
  1. #1
    Hello1 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    32

    Calculated field question

    Hi guys, sorry for bothering but I got one question for which im trying to find a solution. If someone has an idea it would be cool.

    Heres the problem im facing:

    I made a table which shows race results (its bigger but i made it shorter to explain easier n faster). In the next screenshots you can see the table and the function which im using in the "EarnedPoints" field. The function works perfect but the problem is that one race gives double points, so instead of 25 points for first position it should be 50. To be more precise, i need to add in the function if the city name in the "RaceCity" field is "Abu Dabhi" to double the earned points in the "EarnedPoints" field, and all other races in other cities to keep like they are. Please if anyone knows the solution let me know


    P.S. the function is much longer (till position 10) but i made it shorter to be more clear.

    Thanks!
    Attached Thumbnails Attached Thumbnails table.PNG   funkcija.PNG  

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    suggest multiply your iif statement (abbreviated here)

    iif([EndingPosition].....)))*iif([RaceCity]="Abu Dabhi",2,1)

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Maybe:

    your existing expression * IIf([RaceCity]="Abu Dhabi", 2, 1)

    Note correct spelling of Abu Dhabi
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Hello1 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    32
    Damn so simple but was so far
    Big thanks guys!
    Solved!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Report Question on Calculated Label or Text Box
    By mrmmickle1 in forum Access
    Replies: 4
    Last Post: 07-26-2015, 11:09 AM
  2. Replies: 2
    Last Post: 12-30-2014, 01:32 PM
  3. Replies: 2
    Last Post: 12-15-2013, 02:29 AM
  4. Calculated Field on form (beginner question)
    By Williams485 in forum Access
    Replies: 21
    Last Post: 02-26-2013, 09:02 AM
  5. Calculated and send to totals. Question
    By castellano in forum Programming
    Replies: 1
    Last Post: 06-12-2009, 12:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums