Trying to Change a Variable in Main Form from Subform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Talnus
    New Member
    • Jun 2010
    • 4

    Trying to Change a Variable in Main Form from Subform

    From an OnChange in VBA in a SUB form I am trying to change a value in the main form.

    Basically this is to let me know at a quick glance if any of the data has changed on the sub form.

    Any Ideas?
  • MikeTheBike
    Recognized Expert Contributor
    • Jun 2007
    • 640

    #2
    Originally posted by Talnus
    From an OnChange in VBA in a SUB form I am trying to change a value in the main form.

    Basically this is to let me know at a quick glance if any of the data has changed on the sub form.

    Any Ideas?
    Hi

    Try this in the on current even

    Me.Parent.txtCo ntrolName = "Value to be set"

    Any question/problems, please ask.


    MTB

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #3
      Your code on the sub-form can refer to the main form as Me.Parent. From there only you know which controls are available and which should be updated.

      Welcome to Bytes!

      Comment

      • Talnus
        New Member
        • Jun 2010
        • 4

        #4
        Awsome this was to simple, it worked perfectly Thank you

        Comment

        Working...