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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice