I have been working on this since yesterday and am getting closer now with this code. This code runs through all 600 SQL records and populates the combo box just fine but only displays one combo box result at a time. Could someone please help me with whatever is missing to get all 600 records to accumulate in the combo box list ?
SQLb = "SELECT Coil FROM CoilSpec.dbo.coilspec"
Set CN = New ADODB.Connection: CN.Open "driver={SQL Server};" & _
"server=172.16.6.172;database=coilspec;uid=dtuttle;password=mpmadmin"
Set rs = CN.Execute(SQLb, , adCmdText)
If Not (rs.EOF) Then
rs.MoveFirst
While Not rs.EOF
cmbWCoilNo = rs.Fields("Coil")
rs.MoveNext
Wend
End If
rs.Close: CN.Close: Set rs = Nothing: Set CN = Nothing: Exit Sub
Thank you for your patience and assistance, I am new at this and appreciate the help.
SQLb = "SELECT Coil FROM CoilSpec.dbo.coilspec"
Set CN = New ADODB.Connection: CN.Open "driver={SQL Server};" & _
"server=172.16.6.172;database=coilspec;uid=dtuttle;password=mpmadmin"
Set rs = CN.Execute(SQLb, , adCmdText)
If Not (rs.EOF) Then
rs.MoveFirst
While Not rs.EOF
cmbWCoilNo = rs.Fields("Coil")
rs.MoveNext
Wend
End If
rs.Close: CN.Close: Set rs = Nothing: Set CN = Nothing: Exit Sub
Thank you for your patience and assistance, I am new at this and appreciate the help.