Using MS Access/Populat Combobox with specific records from table
I have a main form CheckListF (based on the table CheckListT). In CheckListF there is a subform named CheckListCritFsub. In the subform field WorkInst, I pick from a dropdown combobox (there are hundreds of work instructions). I repeat as necessary so there are several WorkInst records created (1 checklist can have several work instruction numbers).
i.e. CkLstAutoNo 100
WorkInst GW0001, GW0010, GW0012, GW0015
On the CheckListF there is a hyperlink on CkLstAutoNo(PK) to open a form named QuestionF. In QuestionF there is a subform named QuestionFsub(1 checklist will have many questions). The QuestionFsub master/child link is CkLstAutoNo.
In QuestionFsub subform, I would like to have a combobox populated with the work instructions I chose from the dropdown WorkInst in the subform CheckListCritFsub
i.e. combobox in QuestionFsub contains GW0001, GW0010, GW0012, GW0015
I hope I was able to make my question clear.
Thank you very much for your time
This is handled in the RowSource of the combo. You need to build a query of the selected Work Instructions. Something like:
SELECT WorkInst FROM table WHERE CkLstAutoNo = Forms!formname!controlname
Hope this helps,
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA