By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,264 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,264 IT Pros & Developers. It's quick & easy.

Working with subforms

100+
P: 145
I have a form bound to my People table to display data about a selected person. If the person is a musician (indicated by a flag in the People record) there may be one or more entries in a second table, Musos, each entry containing the PersonID and the instrument they play. If they play several instruments, they may have several entries in Musos.

On the main form there is a subform bound to the Musos table and linked on PersonID. The subform should show, in continuous forms view, a list of the instrument(s) they play. The record is updatable - I want to have a combo box on the subform allowing the user to select an instrument from a third table, Skills. But I can't figure out how to get it working. The row source is currently set to
Expand|Select|Wrap|Line Numbers
  1. SELECT [Skills].[SkillID], [Skills].[Skill] FROM Skills ORDER BY [Skill]; 
. Can anyone help?
Apr 14 '20 #1

✓ answered by twinnyfo

The Combo Box should be bound to the Skills Field in the Musos Table. Every time you select an instrument on a new record, it will associate that new record with the current person filter in the subform.

Hope this hepps!

Share this Question
Share on Google+
3 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,482
The Combo Box should be bound to the Skills Field in the Musos Table. Every time you select an instrument on a new record, it will associate that new record with the current person filter in the subform.

Hope this hepps!
Apr 14 '20 #2

100+
P: 145
Ah, thank you. I was binding the wrong field, for some reason.
This now works for adding an instrument or changing to another instrument. When I delete an instrument it leaves the Musos record there with an empty SkillID field and hence an empty slot in the subform list, but I guess I can write code to delete the record.
Apr 14 '20 #3

twinnyfo
Expert Mod 2.5K+
P: 3,482
Glad I could hepp! Let us know if you need anything else.
Apr 14 '20 #4

Post your reply

Sign in to post your reply or Sign up for a free account.