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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access file data to list box

Status
Not open for further replies.

domt

Programmer
Mar 13, 2001
115
US
I would like to load data from an Access file yo a VB6 list box, but first the VB program would Sort the Access table. What coding is used to Sort an Access table from VB ?
Thanks for any help
 
try this :

sqlStr = "SELECT * FROM table_name"

rsList.cursorlocation = aduseclient

rsList.open dbcon,sqlStr

rsList.sort = "Sort_field ASC"

while rslist.eof = false
list1.additem (rslist.fields("field_name"))

wend
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top