Populate DBCombo at run time
Posted on 2004-04-02
I have a simple form with a DBCombo that I want to populate from a field from and SQL database. I can make the connection ok, but can't get anything but the first record to add to the combo. Here is what I have so far.
Private Sub Form_Load()
Dim rs As ADODB.Recordset
Dim vSQL As String
Dim vUsers() As String
Dim x As Integer
Set rs = New ADODB.Recordset
GetServerFromReg 'Gets server connection info from registry *WORKING*
Open_Conn 'This opens the connection *WORKING*
vSQL = "SELECT pUser from tblMembers"
rs.Open vSQL, intCon, adOpenStatic, adLockOptimistic, adCmdText
Set cmbUser.DataSource = rs 'Seems to be working
'**This is where I think I am missing something unless I am totally on the wrong track.