Hi Access-Friends,
I want to run a query and show the result in a listbox. Does anybody know how to do it?
Here is what I have:
....
(multiselect from a listbox)
.....
Set DB = CurrentDb()
'Set Q = DB.QueryDefs("Query11")
Q.SQL = "Select Field1 From Table1 Where [ID]=" & Criteria
Q.Close
DoCmd.OpenQuery ("Query11")
How I can change this code to show the result in a listbox?
I appreciate your suggestions,
Key
I want to run a query and show the result in a listbox. Does anybody know how to do it?
Here is what I have:
....
(multiselect from a listbox)
.....
Set DB = CurrentDb()
'Set Q = DB.QueryDefs("Query11")
Q.SQL = "Select Field1 From Table1 Where [ID]=" & Criteria
Q.Close
DoCmd.OpenQuery ("Query11")
How I can change this code to show the result in a listbox?
I appreciate your suggestions,
Key