|
-
Apr 29th, 2013, 07:48 PM
#1
Thread Starter
Junior Member
listbox posting "argument exception..."
This may seem like a simple or dum questions but in my list box, I want it to always display a couple messages. Under those, I want it to diplay results from a datasource. My code is:
Dim invquery = From inv In _MICROLAND_1_DataSet2.Inventory
Join orders In _MICROLAND_1_DataSet.Orders
On inv.itemID Equals orders.itemID
Select inv.itemID & " " & (inv.quantity - orders.quantity) & " " & inv.description
lstBox.Items.Add(CStr("Here are the items that are out of inventory or must be reordered."))
lstBox.Items.Add(CStr("The numbers shown give the minimum reorder quantity required."))
lstBox.Items.Add(" ")
lstBox.DataSource = invquery.ToList
lstBox.SelectedItem = Nothing
But the results I get are the datasource and it states my messages are "argument exception unhandled." How do I fix this and why is it claiming this?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|