Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2002

    Unanswered: referencing objects in an unbound subform from the parent form - How?

    I have various unbound controls on a parent form. As I update those controls, I want to update a control on the subform. However, I cannot figure out how to reference the object in the subform.

    so if I have a form named "frmMainForm" and a sub form "frmsubDetails", and I have a ComboBox on the main form named "Combo1" and a ComboBox on the subform named "subCombo1".
    The frmsubDetails is assigned to a Subform named DataDetails.
    I basically want the OnChange event for Combo1 to be:
    DataDetails.subCombo1 = Combo1

    (now don't tell me about the many other ways to do this...I realize this. I am attempting something more complicated, but instead of getting hung up on the complex details, I am trying to illustrate the simple side of what I want to do so I can understand the syntax that I am missing.)

    I am not interested in referencing the object by [Forms].[fmrsubDetails]....etc because my intention is to swap different forms into the Subform box based on various conditions with controls that are named the same, and then update the controls from the parent form regardless of which particular form is in the subform block...

    I hope this all makes sense, and I hope someone has a suggestion.


  2. #2
    Join Date
    Oct 2001
    Bay Area, CA
    You mention that the name of the subform frame is DataDetails.

    So you should be able to reference the combobox on your subform with

    Hope this helps...

  3. #3
    Join Date
    Nov 2001

    Me.frmsubDetails.Form.subCombo1 = me.Combo1


  4. #4
    Join Date
    Apr 2002
    Torgue, you were on it thanks...but since I am referencing from the parent form, if you are into that whole brevity thing, it can just be referenced as:
    DataDetails!SubCombo1 = Combo1

    All I was missing was using a ! instead of a . I should have thought about trying that. Thanks for the help...

Posting Permissions

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