I am attempting to populate a listbox with data in 3 separate tables, but it keeps just putting each entry on 1 line rather than creating new lines. These are the tables:
Attachment 96993
This is what the output should look like:
Attachment 96995
This is what my output looks like:
Attachment 96997
Here's my code:
Any VB gurus able to chime in on what on earth I need to do? I do NOT understand queries, databases, or VB enough to get this on my own. :blush:
Attachment 96993
This is what the output should look like:
Attachment 96995
This is what my output looks like:
Attachment 96997
Here's my code:
Code:
Dim query2 = From customers In MICROLANDDataSet.Customers
Join orders In MICROLANDDataSet.Orders
On customers.custID Equals orders.custID
Join inventory In MICROLANDDataSet.Inventory
On inventory.itemID Equals orders.itemID
Order By customers.custID Ascending
Select customers.name & " " &
customers.street & " " &
customers.city & " " &
orders.quantity & " " &
inventory.description & " " &
inventory.price _
Distinct
lstOutput.Items.Clear()
lstOutput.Items.AddRange(query2.ToArray)