By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,042 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

Listbox, retrieve a column from access and still able to add new item

P: 1
Using vb.net
MS access for database

I'm using vb.net

using the code
ListBox1.DataSource = SalesDataSet.Tables(0)
ListBox1.DisplayMember = "reg_usepas"

allows me to retrieve the data,
but forbids me on adding new item on the listbox

this is the error:
Items collection cannot be modified when the DataSource property is set.
Mar 10 '13 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,382
Have you tried adding the new item to the data source instead?
Mar 10 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.