Option group control for viewing subforms on main data entry form

G

Guest

I have a main form for data entry that contains several subforms identifying
various types of structures. The subforms store data unique to each
structure type.

On the main form there is also an option control group that identifies what
type of structure for each record. Based on the selection made in the option
control group, I would like the associated subform to be visible, with the
other two hidden. Using the DoCmd, I have been able to program the subform
to pop-up based on the option group selection but would like to have the
subform change and be active within my main data entry form.

Any suggestions?
 
R

Rob Oldfield

In the after update event of the frame you can do something like...

select case ctlFrame
case 1
me.ctlSubForm.sourceobject="FormName1"
case 2
me.ctlSubForm.sourceobject="FormName1"
..
..
..
end select

You may also need to update me.ctlSubForm.linkchildfields and/or
me.ctlSubForm.linkmasterfields but it would be the same idea. (Obviously
the fact that you're using subform control for many different forms limits
you spacewise.)
 

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