473,795 Members | 2,922 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3720
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.goo gle.com...
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
2793
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 columns and then copy all of the data across. As far as I am aware when you add a DEFAULT column the following happens:
3
5649
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 one locked that is edited ?? While Not rst.EOF With rst lon = !lon
9
14587
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 FirstName/LastName/email? Or is it possible to allow this but to throw up an alert message? Warning that this person is probably already in the database? TIA
2
1855
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 subform. I added a field to my table, and modified the design of my subform. Now, data is not getting displayed on the subform for any form records. I did not change any properties. I'm on XP Pro and using MS Office 2000 Pro.
3
10034
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 to return to each Postback URL, but rather only the initial page URL. Is there a way to prevent Postback URL's from being added to the browser's history list Thanks in advance for any help.
4
1143
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 was wondering if there was a better approach. Cheers Blu
1
1569
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, which the datagrid is based on or you haven't added anything to the columns. How do I do that and how do I add things to the columns if the Datagrid is not bound to a database or want to add things not from a database. Hope you understand what I...
0
1971
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 minds hanging around here, and I was hoping someone could point me in the right direction. I'm using MS SQL 2005 and I have created a table of "level changes" that basically stores the device name , the previous level and the new level along...
4
2163
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 for some unknown reason. I've been having a problem recently where one table (Project Info) keeps auto-incrementing when I try to create a new record with another table (Equipment Info). Only the Equipment table is supposed to grow. It used to never...
0
10439
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7541
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.