Updating List

Arrowx7

Registered User.
Local time
Today, 04:12
Joined
Feb 1, 2005
Messages
19
hello,
I have a list box and I use this to add stuff to the list. I loop through the recordset to add all the items to the list box i use this:
Me!RecordList.AddItem Item:=rst("id") & ";'" & rst("name") & "'"

This does not work, but if I put this down:

MsgBox rst("name")
Me!RecordList.AddItem Item:=rst("id") & ";'" & rst("name") & "'"

It works, but it brings up the message box for every entry. Anyone know what's wrong and how to get it to work?
This is part of a search, as the user is typing in the search box, for every character he/she hits it searches and displays search results in the list box. Is there a more efficient way of doing this? Thanks.


Thanks in advance!
 
Last edited:
Arrow,

You're obviously using a Recordset for this. Why not set the RowSource
for the ListBox to a query, or:

"Select id, name From YourTable Order By Name"

Wayne
 
you the man! thanks so much
 

Users who are viewing this thread

Back
Top Bottom