Displaying a particular subform

B

buzz

I have a problem trying to display a subform. I would like to be able to
have a combo box list a few selections possible and based on that selection,
display a subform (there would be a different subform per selection from the
list in the combo box) as part of this form that I'm entering from. I am
having problems trying to set the control source of a subform to
automatically change if a value from the combo box adjusts as well. How
would I go about trying to complete this task??
 
A

Albert D.Kallal

lets assume your combo box has two columns

formname formDescription

You combo box would be set to display ONLY the formDescription for your
users, but in fact return he value of the 1st column (formName). (you can do
this by setting the left of the 1st column to 0, and thus only your 2nd
column (description) shows).

It is then a simple matter to put the following code in the after update
event of the combo box;


me.MySubFormControlName.SourceObject = me.MyCombo

It is not clear if any master/child link fields are involved here (if they
are...you need to set them, or simply set the recordsource of the sub form
in code).
 
R

rrohde55

the problem is is that the combo box would need to perform functions such as
check boxes. How can this be done in a combo box?
 
A

Albert D.Kallal

rrohde55 said:
the problem is is that the combo box would need to perform functions such
as
check boxes. How can this be done in a combo box?

Hum, you kind of lost me here? I don't understand what a combo box, and
setting what form shows has to do with a check box on a combo?

Is this a complete different question that is un-related to the original
one, or did I complete miss understand the original question?

The example I gave assume you have form, and then also have a sub-form. You
select what form to show from the combo box, and after you make the
selection, the sub-form will then be displayed. This is what I assumed your
question was, and this is what my example will do.

As for showing a check box on a combo, I can't see much how that would work
very well. However, you can perhaps display a "list" of forms in ANOTHER
sub-form, and use this sub-form in place of the combo box. If you take look
at the following screen shots, you can see in fact that I used a sub-form
in PLACE of a listbox for the very need of showing a check box. Take a look
here, and note the use of a sub-form in place of a listbox, and this might
give you some ideas.

http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

And, if I misunderstood the original question, please do fell free to
expand on what you are trying to accomplish here.
 

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