Re: VB Listbox?
- From: "Bob Butler" <noway@xxxxxxxxxxx>
- Date: Mon, 10 Mar 2008 08:11:11 -0700
"Mitchel" <Stratlake@xxxxxxxxx> wrote in message news:58041163-862c-4f47-95c9-2b2b1a5fa8e6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 11, 12:31 am, "Bob Butler" <no...@xxxxxxxxxxx> wrote:
"Mitchel" <Stratl...@xxxxxxxxx> wrote in message
news:9c73fbbb-454f-4783-9b13-6946836d358b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I have created an Access DB Query( Client names) and have a VB6 Form
> frontend. I need to create a search using a Textbox and Listbox, where
> I type into the Textbox and the results from the query are returned in
> the listbox. How do I do this??
> 22 minutes ago
What part are you having trouble with?
opening the database?
running the query?
loading the listbox?
15 minutes from now
Yeh I just dont know what code to use?
I've created an ADO and connected it to the query, but i dont know how
to populate the list?
"created an ADO"? Do you mean an ADO data control? Connected to the query how?
I just need a good front end that I can search the database by
firstname, lastname of ID(autonumber).
You probably need to post some code of what you have tried already. Your code should look something like
dim DB as adodb.connection
dim RS as adodb.recordset
set db=new connection
db.open "whatever the connection string is for your database"
set rs=db.execute("select thefield from thetable where thefield like '%" & _
replace(text1.text,"'","''") & "'")
list1.clear
do until rs.eof
list1.additem "" & rs.fields("thefield").value
rs.movenext
loop
rs.close
db.close
.
- Follow-Ups:
- Re: VB Listbox?
- From: Mitchel
- Re: VB Listbox?
- References:
- VB Listbox?
- From: Mitchel
- Re: VB Listbox?
- From: Bob Butler
- Re: VB Listbox?
- From: Mitchel
- VB Listbox?
- Prev by Date: Re: adding objects to a collection
- Next by Date: Re: adding objects to a collection
- Previous by thread: Re: VB Listbox?
- Next by thread: Re: VB Listbox?
- Index(es):
Relevant Pages
|
Loading