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

Prevent certain columns being edited or new records added.

P: n/a
Ben
I have looked around for this but I seem to be missing something. I
have a forum based on a query that brings display some table info in
tabular form. What I would like to do is prevent the user from adding
records or modifying certain columns.

Example: My headings are: First Name, Last Name, Time, Penalty, and
Total.
The First and Last Should not be edited in this form. Only Time and
Penalty should be edited here. The total column just adds Time and
Penalty and is not saved in the table as recommended.

I do not want the user to add any new records here. I will have a
command button that the brings up a popup so the user can pick a name
to add if required. I know how to have the name added. Just the
restrictions I am not sure about.

Thanks
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
To toggle allowing new records, set the Form's AllowAdditions property to True or False.

To lock certain fields, set the Locked value of the control for that field to True. Locked
and Enabled work together.

Locked = False, Enabled = True - Standard Control Behavior

Locked = False, Enabled = False - Grayed Out Control

Locked = True, Enabled = True - Control looks like a normal control and can be clicked
into to copy its contents for copy and paste, but can't be changed

Locked = True, Enabled = False - Control looks like as normal control, but can't even be
clicked into.

Regardless of these settings, the control's value can still be changed through code.

--
Wayne Morgan
"Ben" <be****@hotmail.com> wrote in message
news:bd**************************@posting.google.c om...
I have looked around for this but I seem to be missing something. I
have a forum based on a query that brings display some table info in
tabular form. What I would like to do is prevent the user from adding
records or modifying certain columns.

Example: My headings are: First Name, Last Name, Time, Penalty, and
Total.
The First and Last Should not be edited in this form. Only Time and
Penalty should be edited here. The total column just adds Time and
Penalty and is not saved in the table as recommended.

I do not want the user to add any new records here. I will have a
command button that the brings up a popup so the user can pick a name
to add if required. I know how to have the name added. Just the
restrictions I am not sure about.

Thanks

Nov 12 '05 #2

P: n/a
Ben
Perfect. Exactly what I was looking for.

Thanks.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.