Hi All,
I have a form with two listboxes. (ContractsListBox and AppsListBox).
ContractsListBox lists all the contracts available. The idea when a contract is selected, the afterupdate event fires, extracting the selection as a string, compose a SQL query and "tries" to change the rowsource of the AppsListbox.
Code is
Code:
Private Sub ContractListBox_AfterUpdate()
Dim j As Long
Dim Contract As String
Contract = Me.ContractListBox.Value
strSQL = "SELECT [ContractFileNames].[FileNameID], [ContractFileNames].[APP] FROM ContractFileNames WHERE Contract='" & Contract & "';"
Debug.Print strSQL
Me.AppBoundList.RowSource = strSQL
End Sub
I initially populate the AppsListBox with a SQL query that lists all the apps across all the contracts and apps show when I first run the form.
However, when I try to select a contract, I get "Compiler error: Method or data member not found" and the rowsource method is highlighted in the IDE.
I would appreciate any ideas because I'm hitting my head against the wall thus far.
Thanks
tc