Combo box determine subform

  • Thread starter hotrod1952 via AccessMonster.com
  • 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?
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top