I have two listboxes that are bound to two recordsets. When the user selects an item from the first listbox, I use a setSQLText statement to filter the data in the second recordset to display in the second listbox. The first time I click on an item in the first listbox, the second listbox properly updates with the filtered "subset" of data from the setSQLText statement. If I make a different selection from the first listbox, it does not update the data in the second listbox again. Do I need a command to update the listbox? Here is the code for my first listbox, Name is the recordset for the second listbox:
Sub DivListbox_onchange()
Name.close
Division.moveAbsolute(DivListbox.selectedIndex+1)
Div = Division.fields.getValue("Divsn"
NameSQL = "SELECT Last, First, . . . WHERE (Division = N'" & Div & "') ORDER BY Last, First"
Name.setSQLText(NameSQL)
Name.open
End Sub
Thanks for any suggestions.
Sub DivListbox_onchange()
Name.close
Division.moveAbsolute(DivListbox.selectedIndex+1)
Div = Division.fields.getValue("Divsn"
NameSQL = "SELECT Last, First, . . . WHERE (Division = N'" & Div & "') ORDER BY Last, First"
Name.setSQLText(NameSQL)
Name.open
End Sub
Thanks for any suggestions.