listbox columns

S

serdar özener

Dear authorized;

Word 2003 visual basic form did. I'm using in the form listbox. the number
of columns 3 listbox. How do I add columns of data. I'm getting data from
oracle database. listbox column headers name, last name and the phone is. I
would add however, all data fields in a listbox individual is added to the
bottom line. Columns are not included.

Exam.:

ConnString = "Driver={Microsoft ODBC for Oracle}; Server= " & vt & "; "
ConnString = ConnString & "Uid=" & user & "; Pwd=" & pass & ";"

Set OraConnection = New ADODB.Connection
OraConnection.ConnectionString = ConnString
OraConnection.Open

Dim RS As New ADODB.Recordset
RS.Open "Select * from PRST0001 WHERE PRS_NAME_GIVEN LIKE '%" &
frmHasta.txtSoyadi.Text & "%'", OraConnection, adOpenKeyset, adLockOptimistic

Do Until RS.EOF
frmHasta.liste.AddItem RS!PRS_NAME_FAMILY
RS.MoveNext
Loop

OraConnection.Close
Set OraConnection = Nothing


Thank you in advance. Good work.
 
J

Jean-Guy Marcil

serdar özener was telling us:
serdar özener nous racontait que :
Dear authorized;

Word 2003 visual basic form did. I'm using in the form listbox. the
number of columns 3 listbox. How do I add columns of data. I'm
getting data from oracle database. listbox column headers name, last
name and the phone is. I would add however, all data fields in a
listbox individual is added to the bottom line. Columns are not
included.

Exam.:

ConnString = "Driver={Microsoft ODBC for Oracle}; Server= " & vt & ";
" ConnString = ConnString & "Uid=" & user & "; Pwd=" & pass & ";"

Set OraConnection = New ADODB.Connection
OraConnection.ConnectionString = ConnString
OraConnection.Open

Dim RS As New ADODB.Recordset
RS.Open "Select * from PRST0001 WHERE PRS_NAME_GIVEN LIKE '%" &
frmHasta.txtSoyadi.Text & "%'", OraConnection, adOpenKeyset,
adLockOptimistic

Do Until RS.EOF
frmHasta.liste.AddItem RS!PRS_NAME_FAMILY
RS.MoveNext
Loop

OraConnection.Close
Set OraConnection = Nothing


Thank you in advance. Good work.

I can appreciate that you have difficulty writing in English, however, do
get some who can help you write in English, those Internet translator are
not very good, especially if you are using a language that is from a totally
different family of languages.

Meanwhile, try this

http://word.mvps.org/faqs/interdev/filllistboxfromxldao.htm
 
S

serdar özener

thank you very much Jean-Guy Marcil.

Jean-Guy Marcil said:
serdar özener was telling us:
serdar özener nous racontait que :


I can appreciate that you have difficulty writing in English, however, do
get some who can help you write in English, those Internet translator are
not very good, especially if you are using a language that is from a totally
different family of languages.

Meanwhile, try this

http://word.mvps.org/faqs/interdev/filllistboxfromxldao.htm
 

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