O
OTWarrior via AccessMonster.com
I have looked on this forum for this error, and the solutions haven't worked
for me (guessing my code is a bit different).
Basically, i want to load the values of a table into a combo box for
selection, which did work before, but now i have exceeded the 2000 character
limit on the string (i have taken over from someone else who worked on this
form before, so did not forsee this problem until it happened)
Here is the code to populate the combobox i use:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSource As String
Set db = CurrentDb
Set rs = db.OpenRecordset("tbl_DAY_Providers", dbOpenDynaset)
strSource = "0;All"
rs.MoveFirst
Do Until rs.EOF
strSource = strSource & ";" & rs.Fields(0) & ";" & rs.Fields(1)
rs.MoveNext
Loop
rs.Close
Me.Combo65.RowSource = strSource
The last line is the problem (or at least where debug highlights) as the
string is quite large here (over 3000 characters). I did try the LEFT()
command as another thread suggested, but that failed.
Any ideas on how to fix this would be GREATLY appreciated, as this went live
today, and I could really use the help.
for me (guessing my code is a bit different).
Basically, i want to load the values of a table into a combo box for
selection, which did work before, but now i have exceeded the 2000 character
limit on the string (i have taken over from someone else who worked on this
form before, so did not forsee this problem until it happened)
Here is the code to populate the combobox i use:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSource As String
Set db = CurrentDb
Set rs = db.OpenRecordset("tbl_DAY_Providers", dbOpenDynaset)
strSource = "0;All"
rs.MoveFirst
Do Until rs.EOF
strSource = strSource & ";" & rs.Fields(0) & ";" & rs.Fields(1)
rs.MoveNext
Loop
rs.Close
Me.Combo65.RowSource = strSource
The last line is the problem (or at least where debug highlights) as the
string is quite large here (over 3000 characters). I did try the LEFT()
command as another thread suggested, but that failed.
Any ideas on how to fix this would be GREATLY appreciated, as this went live
today, and I could really use the help.