1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

After Update statement

Discussion in 'MS Access' started by edreamers, Apr 20, 2008.

  1. edreamers

    edreamers New Member

    Joined:
    Nov 28, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i have a problem. I want to achieve this

    total2=gross_Salary+perquisites+profits
    total3=house_rent+transport_allowance+others

    i used AfterUpdate() function on form to do the calculation and to save the results in the table.

    Private Sub grossSalary_AfterUpdate()
    Me.total2 = Me.grossSalary + Me.perquistes + Me.profits
    End Sub

    Private Sub perquistes_AfterUpdate()
    Call grossSalary_AfterUpdate
    End Sub

    everything is working fine till there. Now in the next fields i have to do calculation on these calculated results and save the results in table.

    I want to achieve this:
    Gross_taxableSalary=total2-total3

    I tried to use the AfterUpdate function again, but this time its not working.
    Private Sub total2_AfterUpdate()
    Me.gross_taxableSalary = Me.total2 - Me.total3
    End Sub

    Private Sub total3_AfterUpdate()
    call total2_AfterUpdate()
    End Sub

    Please help me. its very urgent.
     

Share This Page