form and subform

  • Thread starter ruomingxu via AccessMonster.com
  • Start date
R

ruomingxu via AccessMonster.com

Hi, I was wondering if it is doable and if everyone can help me with this.
I have a combo box on a main form. Each time when a user clicks on the combo
box, depending on the value the use chooses in the combo box, a different
subform should pop up for data entry. I don't know if it is doable. I
appreciate it if anybody would share their ideas.

Thanks.

Richard
 
D

Douglas J. Steele

You seem to be using terminology in a non-standard fashion. Subforms are
parts of a form: you cannot "pop up" a subform.

If you mean that you want a pop-up form to appear, you can put logic in the
combo box's AfterUpdate event to determine which form to open, and use the
OpenForm method to open it.

If you mean that you want a different subform to appear in your main form,
that's doable too. Again, you put logic in the combo box's AfterUpdate event
to determine which subform to use, and you change the SourceObject of the
subform control on the parent form. Note that you might also have to chage
the LinkChildFields and LinkMasterFields properties if you change which
subform is being displayed.
 
Top