473,395 Members | 1,343 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,395 software developers and data experts.

Prevent certain columns being edited or new records added.

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
2 3701
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
Ben
Perfect. Exactly what I was looking for.

Thanks.
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Paul | last post by:
Hi I have a table that currently has 466 columns and about 700,000 records. Adding a new DEFAULT column to this table takes a long time. It it a lot faster to recreate the table with the new...
3
by: Stefan Goerres | last post by:
Hi alls, I have some code like the following and get errors 3052 while execution :( Is there any way around it? How can I prevent the locking for all records in the set? I think I only need the...
9
by: Catherine Jo Morgan | last post by:
Can I set it up so that a certain combination of fields can't contain the same entries, on another record? e.g. a combination of FirstName/LastName/address? Or FirstName/LastName/phone? Or...
2
by: Scott | last post by:
In my database, I have a form with a subform. I had everything working correctly - the correct records would display on the subform for each record on the form. I could edit, add, and delete on the...
3
by: Rob | last post by:
Each time a webform is posted back (submitted), another URL is added to the browser's history list. My web application allows a back button to return to previously visited pages, but I do not wish...
4
by: BluDog | last post by:
Hi I have a basic UserControl that i want to be able to prevent controls being added to, i was thinking about catching the ControlAdded event and then removing the control immediatley after, but...
1
by: Familjen Karlsson | last post by:
Hi I want to add columns in a Datagrid and I want the Columnheaders to show and empty cells to show without adding any records. For example, sometimes there aren 't any records in the database,...
0
by: jehrich | last post by:
Hi Everyone, I am a bit of a hobby programmer (read newbie), and I have been searching for a solution to a SQL problem for a recent pet project. I discovered that there are a number of brilliant...
4
by: jbrumbau | last post by:
Hello, I have been successfully using a database I've created for several months to populate an equipment list for a project we've been working on. However, the form has recently stopped working...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.