Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass recordset to listbox.rowsource

Status
Not open for further replies.

Crookshanks

Technical User
May 18, 2004
296
NL
Hello there,

I've build a query and I passed that query to a record set, like this:

dim strSQL as string
dim rs as DAO.Recordset
strSQL = "SELECT ..... bla bla"
set rs = currentdb.openrecordset(strSQL)

I do some modifications in the record set (remove some records) and afterwards I want to display the modified record set in my listbox. What's that best way to do it? I can't just add rs to my listbox. Any help appreciated....

Kind regards,
 
Try

Code:
dim strSQL as string
dim rs as DAO.Recordset
strSQL = "SELECT ..... bla bla"
set rs = currentdb.openrecordset(strSQL)
....
[b][i]set mylstbox.recordset=rst[/i][/b]
 
It works. Thanks. Did not know about the recordset property.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top