Hi All,
Having an issue here passing a variable to a query. To lay it out, on a form there are 2 listboxes. When first is clicked it should pass the value to the query to populate the second
First listbox
Code:
Private Sub lbParts_BeforeUpdate(Cancel As Integer)
Parameterpass = lbParts.Value
Passedvar 'Run the GetPartFunction
lbLocs.RowSource = qry_PartsInv
Me.lbLocs.Requery
End Sub
Global Module
Code:
Public Parameterpass As Integer
Public Function Passedvar() As Integer
Passedvar = Parameterpass
End Function
and finally the query's criteria is set to the Passedvar().
I can see that the Passedvar is correct and when I open the query after the function is run the query is correct, but the second listbox is not populating. Any ideas?