Results 1 to 4 of 4
  1. #1
    FFLKing is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    5

    Adding calculations to a form.

    What I am trying to do is hard to explain but I am going to try and explain it as best as possible. I have a form that I enter football stats into for my FFL league. For the sake of simplicity I am going to focus on the completions(comp) field. I want to add a text box/label to the bottom of the page that will calculate bonuses; if comp<25=0 if comp<50=1 else 2.



    I also want to have the CompBonus field then be entered into a new table so I can track bonuses for each player as well, but I think that will be in a new post.

    Thank you in advance for the help,

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Try the Iif() function.

    IIf(expr, truepart, falsepart)

    =Iif([comp]>25 AND [comp]<50,1,0)

    Use this in you Control Source.

    Dale

  3. #3
    FFLKing is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    5
    Thanks. I was typing in the Excel Function IF() when I first tried it. I dont know why they had to add the extra I in Access.

  4. #4
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    They also have an If.
    Iif() is for SQL.

    Dale

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

Similar Threads

  1. Replies: 6
    Last Post: 05-12-2012, 03:13 AM
  2. Form calculations in query
    By bkirsch in forum Queries
    Replies: 5
    Last Post: 02-24-2012, 04:45 PM
  3. Help with small form calculations
    By Nokia N93 in forum Access
    Replies: 3
    Last Post: 12-06-2011, 06:29 AM
  4. Form/Subform Calculations
    By sidewayzalex in forum Forms
    Replies: 0
    Last Post: 08-15-2011, 01:11 PM
  5. Calculations in a form
    By elmere in forum Forms
    Replies: 3
    Last Post: 04-27-2011, 04:11 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