Combo box determine subform

  • Thread starter Thread starter hotrod1952 via AccessMonster.com
  • Start date Start date
H

hotrod1952 via AccessMonster.com

I have a form with combo box WoDefId I have approxs 300-400 options to choose
from for WoDefId in my combo box. I have a separate table(PMLink) setup with
columns LinkNo (autonumber),WodefId(text),Linkform(text). What I am trying to
do is select 1 of the 300 Options in my combo and use that value to open the
subform. The LinkForm column will contain up to 50+ different subform names
of which I only want the selected one to become visible on my main form. I
am sitting here with a mental block on the easiest way to code this. Ideas?
 
hotrod1952 said:
I have a form with combo box WoDefId I have approxs 300-400 options to choose
from for WoDefId in my combo box. I have a separate table(PMLink) setup with
columns LinkNo (autonumber),WodefId(text),Linkform(text). What I am trying to
do is select 1 of the 300 Options in my combo and use that value to open the
subform. The LinkForm column will contain up to 50+ different subform names
of which I only want the selected one to become visible on my main form. I
am sitting here with a mental block on the easiest way to code this. Ideas?


You do not open a form displayed in a subform control. The
containing subform control will display whatever form object
is specified in its SourceObject property.

If I understand your objective correctly, then all you need
is to use the combo box's AfterUpdate event:

Me.subformcontrol.SourceObject = Me.combobox.Column(n)

where the n is the 0 based number of the Linkform field in
the combo box's row source query.
 
Back
Top