Forms and Programming in VB

A

Alvin

Here is one approach...

Dim db As Database, rs As Recordset
Set db = CurrentDb()
Dim SQL$, Result$
SQL$ = "SELECT someField FROM someTable " _
& " WHERE someCondition"
Set rs = db.OpenRecordset(SQL$, dbOpenSnapshot)
Results$ = ""
While Not rs.EOF
Results$ = Results$ & rs(0) & ";"
rs.MoveNext
Wend
rs.Close
lstResults.RowSourceType = "Value List"
lstResults.RowSource = Results$
lstResults.ReQuery
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top