Hi, all.
This seems easy, but I've looked up and down and can't locate posts that clearly answer this question (though perhaps my search terms weren't good).
My Situation
I have two tables, Client and Project. There is a one-to-many relationship: each client can have many projects associated with it.
I want to make a form on which the user selects the Client name from a combo box and the associated projects are displayed in a subform.
I started by creating an unbound blank form and adding a combo box to it, cboClient, that gets populated from the ClientID field in the Client table. So far, so good.
I create a separate form that is bound to the Project table.
I then added the bound form as a subform to the main form.
I understand that I would requery the subform in the AfterUpdate event of cboClient. What I don't understand is how to link the subform to the combo box. I tried setting the child/master field links in the subform, but Access tells me that "I can't build a link between two unbound forms." This is weird because I'm pretty sure that the subform is bound to the Project table.
How, specifically, do I get the subform to only show projects associated with the client selected in cboClient?
Thanks,
Duluter
This seems easy, but I've looked up and down and can't locate posts that clearly answer this question (though perhaps my search terms weren't good).
My Situation
I have two tables, Client and Project. There is a one-to-many relationship: each client can have many projects associated with it.
I want to make a form on which the user selects the Client name from a combo box and the associated projects are displayed in a subform.
I started by creating an unbound blank form and adding a combo box to it, cboClient, that gets populated from the ClientID field in the Client table. So far, so good.
I create a separate form that is bound to the Project table.
I then added the bound form as a subform to the main form.
I understand that I would requery the subform in the AfterUpdate event of cboClient. What I don't understand is how to link the subform to the combo box. I tried setting the child/master field links in the subform, but Access tells me that "I can't build a link between two unbound forms." This is weird because I'm pretty sure that the subform is bound to the Project table.
How, specifically, do I get the subform to only show projects associated with the client selected in cboClient?
Thanks,
Duluter