** Combo box and subform **

G

Guest

Hi!
I created a combo box and a sub-form so that I can select any field I want
from the combo box and the subform will show the result. So I tried to set
the Link Master/Child properties, but I got a message saying "Can't build a
link betwee unbound forms".

Can anyone help me with this?

Thanks a lot!
 
G

Guest

Hi Lee,

You can only use the link child/master fields between two forms that have a
data source selected (table, query). For unbound forms, use the after upate
event of the combo box to apply a filter to the subform or requery the
subform after setting a new data source.

Damian.
 
G

Guest

Hi Damian,
Could you please explain further? Also, I am not familiar with the VB behind
it? How do you write the after update event of the combo box?

Thanks!
 
R

Ron2006

Actually you CAN do it the way you have it set up, but you have to do
it manually and cannot use the wizard.

Place the combobox name in the Link Master Field

And place the subforms matching key in the Link Child Field.

Works like a charm.

Ron
 
G

Guest

Ron

Thank you so much for this post. After struggling for hours trying to
figure out how to link my main form and subform I read your post...problem
solved.

This is so logical and simplistic...is there any disadvantage to linking the
forms this way?
 
R

Ron2006

I can't think of any and have not come across any as of yet. I have
seen it suggested a number of other times but many times they forgot
to say that you have to do it manually. Then one post put in that
extra step and it finally made sence. It really is not any different
than if the form was based on a table/query. It is the form that is
the child to the other form. The only diffrence is that you can't use
the wizard to set it up.

You can also base multiple subforms on any other field you place on
the form and can load. It also then makes the queries a little more
easily reusuable since you don't have to have a specified criteria in
the form addressing a form.

Sorry for the late reply, have been very, very busy on a rush project.

Ron
 

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