Populate a combo box in a subform from a field in the parent form?
Populate a combo box in a subform from a field in the parent form?
(OP)
I have a field called "Model" in my parent form. Based on the "Model" the user chooses I would like to populate the "Options" field in my subform. When the user chooses an "Option" from the subform, I would like the "Unit Price" for the "Option" to display in the "Unit Price" field. How do I do this?
RE: Populate a combo box in a subform from a field in the parent form?
Since you did not say where the "Options" data is coming from. I have to guess.
If its from a table then you can create a combox box using the Wizard and then edit the SQL code it generates to look at the "Model" field and have a .Requery in the "After Update" event.
SELECT DISTINCTROW Options, FROM YourTable WHERE (((Model)=[Forms]![Your form]![Model]));
I don't know if I have the correct fields in the above SQL.
Private Sub Model_AfterUpdate()
YourCombo.Requery
End Sub
DougP
dposton@universal1.com
Ask me how Bar-codes can help you be more productive.