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
In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!