Advertisement

08.18.2007 at 11:06AM PDT, ID: 22771795
[x]
Attachment Details

Populate a Multi Column Listbox in VB.Net with a recordset

Asked by nomar2 in Microsoft Visual Basic.Net

Tags: listbox, column, populate

I have a listbox with 3 columns on a form in VB.net
 The listbox is called lstbx_sort.
I want tSort.IID in the 1st column, tSort.sName in the 2nd column, tSort.bAssignTable in the 3rd column
The recordset is ..

   myConn2.Open()
   Dim myComm2 As New SqlCommand("SELECT tSort.IID, tSort.sName, tSort.bAssignTable FROM tSort  WHERE (((tSort.IID)<=18 And (tSort.IID)<>17))", myConn2)

How do I loop through this table and load up the  listbox using VB.net code?
Also in Access/VBa I used to use the AfterUpdate event on a textbox to code things...what is the equivalent event on a textbox in VB.NET?

Any help or insight would be much appreciatedStart Free Trial
[+][-]08.18.2007 at 11:52AM PDT, ID: 19723426

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: listbox, column, populate
Sign Up Now!
Solution Provided By: emoreau
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.18.2007 at 12:19PM PDT, ID: 19723488

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.18.2007 at 12:30PM PDT, ID: 19723521

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628