CraigDiver
New member
- Local time
- Today, 20:56
- Joined
- Aug 4, 2006
- Messages
- 6
First of all i'm a novice, so take it easy on me!
I have an access 2000 database with multiple tables and forms.
within one of my forms I wish to populate a listbox (listbox1) with values from a recordset (myRS) that I have created from a SQL query.
All I want to do is populate the listbox with values from the recordset (binding or snapshot - I don't really mind, either will do)
How difficult can this be
Any help much appreciated to get me over this hurdle
CraigDiver
I have an access 2000 database with multiple tables and forms.
within one of my forms I wish to populate a listbox (listbox1) with values from a recordset (myRS) that I have created from a SQL query.
Code:
Function PopList()
Dim dbs As Database
Dim strSQL As String
Dim myRS As Recordset
Set dbs = CurrentDb
strSQL = "SELECT * FROM customer"
Set myRS = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
'Populate listbox with recordset 'myRS'
' ???
End Function
All I want to do is populate the listbox with values from the recordset (binding or snapshot - I don't really mind, either will do)
How difficult can this be
Any help much appreciated to get me over this hurdle
CraigDiver