• On Load Event (2003 sp2)

    Author
    Topic
    #433951

    I have a form with a sub form. As the record changes in the form the records change in the sub form. With each change in the sub form is the on load event triggered?

    Viewing 0 reply threads
    Author
    Replies
    • #1022048

      No, only when the main form is opened.

      • #1022054

        I have a calculated field on the sub form and when it reaches 80 I want the forms allow edits property to be set to False, and when a new record is started and the value is less than 80 to be set to True. I set the sub forms allow edits property to false and used the following code:
        If Me.Hours2 80 Then
        Me.AllowEdits = True
        End If

        Problem is I can’t get it to work. I have attached a database.

        • #1022058

          Try the On Current event:

          Private Sub Form_Current()
          ‘ Update the calculated controls NOW
          Me.Recalc
          ‘ Set AllowEdits
          Me.AllowEdits = (Nz(Me.Hours2, 0) < 80)
          End Sub

    Viewing 0 reply threads
    Reply To: On Load Event (2003 sp2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: