list box source problem

K

Keith G Hicks

I need to populate the source of a list box from an ado recordset

Dim rec As ADODB.Recordset
Set rec = New ADODB.Recordset
rec.Fields.Append "AttyID", adBigInt
rec.Fields.Append "AttyName", adVarChar, 100
rec.Open

Then I get the value from a combo box and do the following:

rec.AddNew
rec!AttyID = Me.cboAttorneys.Column(0)
rec!AttyName = Me.cboAttorneys.Column(1)
rec.Update

rec.Sort = "AttyName"

Finally I need to set the source of the list box to the rec somehow but
that's where I get stuck.

Me.lstAttorneys.RowSource = rec.?????

I have to use Table/View/StoredProc and not ValueList as the RowSourceType
because the number of rows is so that the list exceeds 2048 characters.

How can I solve this? It's an adp so there are no local tables otherwise I'd
just us a local permanent temp table.

Thanks,

Keith
 
K

Keith G Hicks

Never mind I guess. Everything I've found online so far seems to indicate
this is not possible. Bummer. I used a workaround that I'm not thrilled with
but it'll do for now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top