Runtime error 2176
Posted on 2005-04-29
I'm trying to pull a list of values into a listbox and the concantenated length is greater than the listbox allows (something like 2000 characters I think). I've read stuff that says to put it in a table but the underlying data changes daily so I suppose it has to be created dynamically. Could somebody help me out with the syntax please? Thanks! -j
strSQL = "SELECT DISTINCT a.CurrentPayorDesc "
strSQL = strSQL & "FROM RepGrp a ORDER BY a.CurrentPayorDesc;"
Set rst = dB.OpenRecordset(strSQL)
'PayorDD.RowSource = "All Payors"
payorlist = "All Payors"
i = 1
Do Until rst.EOF
tmp = rst.Fields(0)
payorlist = payorlist & ";" & tmp
'PayorDD.AddItem tmp, i
i = i + 1
PayorDD.RowSource = payorlist