Hi
I need the code in VB6 to display data from a database in a listbox
i tried the following code but its not working
Do While Not rec2.EOF
List1.ItemData(List6.NewIndex) = rec2.Fields(4)
rec2.MoveNext

' i even tried
Do While Not rec2.EOF
List1.ItemData rec2.Fields(4)
rec2.MoveNext

Do While Not rec2.EOF
List1.AddItem rec2.Fields(4)
rec2.MoveNext

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.