H
H. Martins
I have a form in which I can browse through records. That form has a
listbox. That listbox has no RowSource and no ControlSource defined
(don't need this last).
Using VBA I make the RowSource string manipulating the usual SQL
statement but modifying the WHERE part of it when needed. Then I use
ListBox.ControlSource = string
It works OK, but I suppose this is not the most clever way to do it.
I suppose there must be a way I can create a Query (project manager ->
queries) and use it against the listbox adding a Where statement to
it and launching listbox.requery, something like this but with the
listbox:
DoCmd.OpenForm "Alunos", , , strWhereCondition
Could I have some help. please?
Thanks
Henry
listbox. That listbox has no RowSource and no ControlSource defined
(don't need this last).
Using VBA I make the RowSource string manipulating the usual SQL
statement but modifying the WHERE part of it when needed. Then I use
ListBox.ControlSource = string
It works OK, but I suppose this is not the most clever way to do it.
I suppose there must be a way I can create a Query (project manager ->
queries) and use it against the listbox adding a Where statement to
it and launching listbox.requery, something like this but with the
listbox:
DoCmd.OpenForm "Alunos", , , strWhereCondition
Could I have some help. please?
Thanks
Henry