Results 1 to 5 of 5
  1. #1
    TerriD is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    3

    Calculating a reimbursement amount in a subform

    New to Access Form Design and thanking you in advance. Trying to create a form that will display the amount that is owed to an employee.

    Our office gives its employees a $125 supply allowance each year. When an employee submits a receipt for a partial amount (say they spend only $35), I enter the amount in the PurchaseAmount field of my subform. The ReimbursementField control source is =IIf([PurchaseAmount]>=125,125,[PurchaseAmount]). The correct amount of $35 is displayed.
    (There is no beginning balance or ending balance field on the form.)

    When a subsequent purchase amount is entered and is over the amount of the remaining balance, (let's say spent $100 and only has $90 remaining) how can I have the form display the correct amount of $90? The closest answers I came across suggested using recordset clone in an AfterUpdate event, but I just can't figure out the proper way to write the calculation. My main form name is "Supply Purchases"; subform name is "Supply Purchases Subform. Thank you again.

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Use the Remaining Amount in you calculation:
    if purchase amount > remaining amount, remaining amount, purchase amount
    Put totals somewhere on the form - Sum(PurchaseAmount), also one for remaining amount if there aren't these already

  3. #3
    TerriD is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    3

    Calculating a reimbursement amount in a subform

    Thank you for the answer. I"m stuck on how to tell Access to start with $125, yet only use it once, as a Beginning Amount. I calculated the "RemainingAmount" as [BeginningAmt]-[PurchaseAmt]. But each subsequent purchase subtracts from $125. Thank you for any suggestions I can try.

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    BeginningAmt - Sum(PurchaseAmt)

    This needs to be on the header or footer of the subform as it needs to get a total of all the Purchase Amts entered up to now

  5. #5
    TerriD is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    3
    Perfect! Thank you very much

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

Similar Threads

  1. limiting amount of records
    By yaro.kobzar in forum Programming
    Replies: 1
    Last Post: 05-17-2011, 07:01 PM
  2. Replies: 2
    Last Post: 10-25-2010, 10:45 PM
  3. Replies: 9
    Last Post: 07-16-2010, 09:25 AM
  4. Code to spell out check amount?
    By spkoest in forum Access
    Replies: 4
    Last Post: 06-16-2009, 07:44 PM
  5. Amount in word in MS. Access 2000 (VBA)
    By dannygan in forum Access
    Replies: 5
    Last Post: 06-07-2009, 11:52 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