Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Unanswered: auto sum text boxes on form

    I have 4 text boxes I wish to sum together and transfer the result to a 5th text box.
    I need this to occur when the contents of any of the 4 text boxes changes.

    I assume it can be accomplished by running a macro from the 'on change' event but have no idea where to start.

    Thanx in advance

  2. #2
    Join Date
    Feb 2004
    In the form's code module, paste the following text:

    Function sumUpdate()

    Text5=Val(Nz(Text1,0))+Val(Nz(Text2,0))+Val(Nz(Tex t3,0))+Val(Nz(Text4,0))

    End Function

    Then set the AfterUpdate property for Text1, Text2, Text3 and Text4 to:

    This should do what you want.

  3. #3
    Join Date
    Mar 2004
    Excellent Matthew.

    Thanx again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts