I have a listbox linked to a querie.
In some form, listboxA query criteria must respect some value stored in listboxB.
Looks like queries can't read the content of a listboxB directly, so I wrote a Static Function that reads listboxB and returns the value for the query criteria of listboxA as Me.lstbxAlunos.Column(0)
It works OK.
====
Now I have a form without a RecordSource. The form opens displaying "? name#". It's OK. That form has a ListBox whose RecordSource have an independente criteria. Selecting a row in that listbox defines a criteria to the form itself.
Again, to be able to get it running, form's RecordSoure is established to a query whose criteria depends on the ListBox selection when something is clicked. Again, I wrote a static function to return to the query the value of the listbox exactly the same way as the example above. It doesn't work. Looks like the query doesn't see the function or doesn't get the listbox value from the function.
Can I have some help, please? Thanks H. Martins
|
|