473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

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

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
1 1371
Rabbit
12,516 Expert Mod 8TB
Have you tried adding the new item to the data source instead?
Mar 10 '13 #2

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

Similar topics

7
by: bettyann | last post by:
I am using Visual Basic 6.0. I have a TextBox control whose "Caption" I wish to access. When I look at the TextBox's structure via the "watch" window, its structure appears to look like the...
2
by: John T. McCraw | last post by:
How can I retrieve just the column names from an Access table. I don't need the data, just the column names.
2
by: Peter Bailey | last post by:
I have a function courtesy of the newsgroup that clears the list box. I would like to now set the listbox back to its initial state where you can see the first item in the list. The same goes for a...
5
by: Joe Fallon | last post by:
I have a list box with 7 text values in it. I have a pair of buttons to Move Up or Move Down the selected item one position. What is the simplest way to code the buttons so the item moves one...
5
by: Ken | last post by:
I'm trying to run a loop to capture column property information from a table in my datasource. Can anybody see where this is going wrong? Dim tbl As New DataTable Dim col As DataColumn Dim x...
8
by: RP | last post by:
I want to retrieve column names (Exact field names) of a table. How to do that?
18
by: Ljordan2k6 | last post by:
Hi. First post here, so I apologize ahead of time if it isn't the best-formatted post. I am working on a form that has a listbox (named LstCustID) that is bound to an access table (named...
1
by: Axel Dahmen | last post by:
Hi, I'd like to retrieve and step through an ObjectDataSource's columns to be able to manually add BoundFields to a GridView control. I don't know how to do this other than to manually call...
2
by: billa856 | last post by:
Hi, My Project is in MS Access. In that I have one form in which I have some textboxes,comboboxes and listboxes. Now when I select value from 1st combobox(CustomerID) then it wil generate list for...
2
by: SandeepJagdeva | last post by:
Hi to all Masters I have a 3 column listbox in MS Access form. My problem is that I have to change some values of listbox columns without changing other column's value. I just...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.