I am using the code below to populate the rowsource of a combo box as a value list in an Access .adp database, the only problem is that there is a char limit to the value list property of the combo box. I am wondering if there is any way in which I can point the ADO.recordset directly at the combo box's rowsource property.
Dim cnn As New ADODB.Connection, rs As New ADODB.Recordset, strSource As
String, strString As String, pword As String
'create an ADODB connection to a Access2000 database
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= G:\IOS\Risk
'create an ADODB recordset using either pure sql or a query resident in the
rs.Open "SELECT [*tblRisk].id, [*tblRisk].Title FROM [*tblRisk]", cnn, , ,
'set the record pointer to the first record in the recordset
'create a loop to step through the open recordset until EOF is reached
Do While Not rs.EOF
'create a value list for the combo box
strString = rs!id & "," & rs!Title
strSource = strSource & strString & ";"
'populate the combo box with the value list
Combo0.RowSource = strSource