G Guest Mar 4, 2006 #1 I need help with binding/synchronizing a list box with a subform in a main form. Can this be done without code? Thank you.
I need help with binding/synchronizing a list box with a subform in a main form. Can this be done without code? Thank you.
A Arvin Meyer [MVP] Mar 4, 2006 #2 Binding, yes. Synchronizing, you really need code, but it's one simple line: If the listbox is in the main form and you are syncing a subform: Sub lstBoxName_AfterUpdate() Me.NameOfSubform.Requery End Sub Use a query as the RecordSource for the subform. Take the field in the query that you want to sync and use the criteria box to Build a criteria: [Forms]![FormName]![ListboxName] I have a sample using mulitple list boxes at the AccessMVP.com website: http://www.accessmvp.com/Arvin/Combo.zip -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads http://www.datastrat.com http://www.mvps.org/access
Binding, yes. Synchronizing, you really need code, but it's one simple line: If the listbox is in the main form and you are syncing a subform: Sub lstBoxName_AfterUpdate() Me.NameOfSubform.Requery End Sub Use a query as the RecordSource for the subform. Take the field in the query that you want to sync and use the criteria box to Build a criteria: [Forms]![FormName]![ListboxName] I have a sample using mulitple list boxes at the AccessMVP.com website: http://www.accessmvp.com/Arvin/Combo.zip -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads http://www.datastrat.com http://www.mvps.org/access