Main form Combobox and subform

gaju_3112

Registered User.
Local time
Tomorrow, 01:19
Joined
Nov 4, 2007
Messages
38
I have placed one combo box on main form. It contains the primary kyes or record. I also added subform on this form which is bind to the query. I want to populate this subform on the basis of value selected in combo box. How can I do it?
I have tried_
Binding the subform to combo box by setting Child field and master field properties but it is giving error "Unlinked forms can not be bound"
Please help.
 
You can just set the criteria of the underlying query of the subform to the combo on the main form and in the after update event of the combo on the main form use:

Me.YourSubformContainerName.Form.Requery

Where YourSubformContainerName is the name of the control that houses the subform on the form. It may have the same name as the subform, but a lot of times it doesn't so you need to make sure to use the right name.
 
Thanx, Boblorson. It worked! My problem is get solved now.
 

Users who are viewing this thread

Back
Top Bottom