Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh combo boxes to limit to current main form record?

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I have a main form that cycles records Deals. You can enter information about the deal.

I have a singers subform and a recorders sub form so you can add 1 or more singers and recorders to a deal. Then on this 3rd subform you are assigning singers and/or recorders to contract representation. I only want to assign representation to a singer or recorder for a deal if they are in this deal.

On this 3rd subform you chose from a combo (FKPartyType) if the party type you will assign representation for, is a singer or recorder. If a singer, then the singer combo (cboSinger) becomes visible with names of singers. If a recorder is chosen, then a different combo (cboRecorder) with the names of the recorders becomes available. Both of these combos are tied to the same record source of cboParty in their table for capturing the entered info. Depending on the FKPartyType field, the value in the cboParty field is pulling the id for a singer or recorder.

I have all that working right (believe it or not). My problem now is that when I open the main Deal form, and cycle to a 2nd deal, the Singers/recorders combos are not filtering to the singers and recorders that are available for that deal. They filter based on the first deal, but don't update to the 2nd. Each singer or recorder can be on multiple deals. So there might be 5 singers in my singers table. 1,2 and 3 might be in deal 1, and 1,3 and 5 might be available in deal 2. When I open the main form to deal 1, I get 1,2 and 3. When I cycle to the 2nd deal, the subform still gives me singers 1,2 and 3.

I'm sorry if I am not explaining this well. I feel like I am but I might not be.

My rowsource for cboSinger and cboRecorder both have a where for the FKDeal in their lookup table to filter to the deal FK on the subform.

Thanks if you can make sense of this and help me out. I have this in the load of the Deal main form and the after update:
Code:
Forms![frmDeal]![frmsubRepresentation].Form.Requery
Forms![frmDeal]![frmsubRepresentation].Form.FKPartyType.Requery
Forms![frmDeal]![frmsubRepresentation].Form.cboSinger.Requery
Forms![frmDeal]![frmsubRepresentation].Form.cboRecorder.Requery

Any thoughts why cboSinger and cboRecorder won't filter to the Deal FK on frmsubRepresentation like they should?


misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top