Unanswered: Requery a Listbox whose Rowsource was changed in a Subform
Hello, I have a listbox on my main form. I change the Rowsource query of this listbox from the OnCurrent event of a Sub Form (because the WHERE condition is dependent on what record is selected in the subform). I also requery the listbox in the subform's OnCurrent event, but the full results are not displayed in the listbox.
Private Sub Form_Current()
Select Case Forms!ODS2Dashboard!tbCheckType.Value
mySQL = "SELECT CheckSubmsnID as NotAssigned FROM [ODSsubmsnChecksSub-PropExpsr] WHERE CheckKey=tbCheckKey.value;"
mySQL = "SELECT CheckSubmsnID as Other FROM [ODSsubmsnChecksSub-PropExpsr] WHERE CheckKey=tbCheckKey.value;"
Forms!ODS2Dashboard!lstCheckData.RowSource = mySQL
For some reason, only the first record is displayed in the listbox (the column header changes (ie "NotAssigned" or "Other"). I added a button on the mainform to requery the listbox and it works once that is clicked, but I don't want the user to have to do that.
I've experimented with all the events in the mainform to no avail.