Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dear experts, Anyone knows how t

Status
Not open for further replies.

joelxez

Programmer
Apr 18, 2002
67
PH
Dear experts,

Anyone knows how to put two fields in listbox?
I have example only one field, how about 2 fields?
Ex:
list1.additem (rs!lname)


Joel,
 
Try:
list1.additem (rs!lname) & vbTab & (rs!fname)


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Instead of using a listbox, try using a listview.
With a listview (set to report mode) you can add many columns and have a header on each column.



-Adam T. Courtney
 
Or, just use a DataGrid/FlexGrid, and a fabricated(created on-the-fly data), or connected, recordset - multi-columns, column headers, searchung, sorting, selecting wlements with ease....

Just set these properties:
datagrid1.RecordSelectors=False
datagrid1.BorderStyle=dbgNoBorder
datagrid1.HeadLines=0

Now, you can add the data via Recordset, as mentioned, from a DB data source(as you would with a bound list box) or fields and records created at run time (thread222-626165)

Give it a try...you'll be surprised.
All record seletion, manipulation, navigation, sorting, searching, etc. is done with the recordset.

The only other real advantage the list box would have is the checkbox, which, with a little bit of work, can be done with a HFlexGrid.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top