Santosh
Santosh

Reputation: 12353

Ms Access Datasheet view - only one column editable

There is access datasheet sub-form and users should only be able to edit count column. How can that be done ?

Currently, If I change the form property Allow Edits = True, users can update any cell.

Also, the user should be able to enter different count values. If a user types 1 in first cell, it get copied for all the rows.

How can this be achieved?

enter image description here

Upvotes: 1

Views: 2297

Answers (1)

jleach
jleach

Reputation: 7790

For each control on the form that you don't want editable, set the Enabled property to False (or the Locked property).

For the count copying to all rows, we need to see the query that this datasheet is based on to answer that. If the count is an unbound textbox, you will get the behavior you are seeing as Access will only create a single instance of the control, then repaint that single instance across all rows (note that this is the same with continuous forms as well)

Instead, create a query that has this field (or a dummy table) and bind to that, making sure to bind the textbox to the dummy field, and then you should be able to edit the value on a per-row basis.

Upvotes: 3

Related Questions