Re: VB Listbox?
- From: argusy <argusy@xxxxxxxxxxxxxxx>
- Date: Tue, 11 Mar 2008 16:12:55 +1030
Mitchel wrote:
On Mar 11, 1:11 am, "Bob Butler" <no...@xxxxxxxxxxx> wrote:"Mitchel" <Stratl...@xxxxxxxxx> wrote in message
news:58041163-862c-4f47-95c9-2b2b1a5fa8e6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 11, 12:31 am, "Bob Butler" <no...@xxxxxxxxxxx> wrote:
"created an ADO"? Do you mean an ADO data control? Connected to the query"Mitchel" <Stratl...@xxxxxxxxx> wrote in messageYeh I just dont know what code to use?
news:9c73fbbb-454f-4783-9b13-6946836d358b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have created an Access DB Query( Client names) and have a VB6 FormWhat part are you having trouble with?
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
opening the database?
running the query?
loading the listbox?
15 minutes from now
I've created an ADO and connected it to the query, but i dont know how
to populate the list?
how?
I just need a good front end that I can search the database byYou probably need to post some code of what you have tried already. Your
firstname, lastname of ID(autonumber).
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- Hide quoted text -
- Show quoted text -
What is a connection string or how do I find it for my database?
I see Ralph is still around answering queries, but he must have missed yours.
The connection string would be
"Provider=Microsoft.jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\db\mitchel\documents\mydata.mdb"
(All on one line. Try it with your database location and name, though)
If it bombs out, reply with the version of access you're using
Graham
.
- Follow-Ups:
- Re: VB Listbox?
- From: Ralph
- Re: VB Listbox?
- References:
- VB Listbox?
- From: Mitchel
- Re: VB Listbox?
- From: Bob Butler
- Re: VB Listbox?
- From: Mitchel
- Re: VB Listbox?
- From: Bob Butler
- Re: VB Listbox?
- From: Mitchel
- VB Listbox?
- Prev by Date: Re: Replace for LSet from VB6.0 to VB.NET
- Next by Date: Re: Bit flipping .. will this work in VB6?
- Previous by thread: Re: VB Listbox?
- Next by thread: Re: VB Listbox?
- Index(es):
Relevant Pages
|