473,989 Members | 32,755 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disabling fields

68 New Member
I have created a form with a few tabs for data entry. The first tab contain fields that i want to disable after data is entered and saved. that is a person comming after to enter data into that form should not be able to change the data they meet. the fields on the tab are combo boxes and and text boxes.
please help
Feb 7 '08 #1
5 1422
NeoPa
32,586 Recognized Expert Moderator MVP
There are various properties for each control (fields are items in a record - controls are items on a form or report). Check out the Locked and Enabled properties for what you want.
Feb 7 '08 #2
KingKen
68 New Member
I cannot use that since i do want people to enter data in the fields iniatially. what i want is for them not to be able to change the data after they would have move to a new record, nor should they be able to alter something that someone else had entered in those fields.
Feb 8 '08 #3
missinglinq
3,532 Recognized Expert Specialist
NeoPa's advice is the only way you can do this, if, as your post suggests, you want to be able to view existing records as well as add new records! You simply have to use the properties conditionally. If , when moving to a record, a field already has data in it, lock it. Otherwise, leave it unlocked.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.    If Not IsNull(Me.TextBoxName) Then
  3.      TextBoxName.Locked = True
  4.    Else
  5.      TextBoxName.Locked = False
  6.    End If
  7. End Sub
Welcome to TheScripts!

Linq ;0)>
Feb 8 '08 #4
KingKen
68 New Member
Dear wizzard of this barn
It worked like a charm
did no harm
once again I can yarn
thanks for the helping arm

Linq
Feb 8 '08 #5
NeoPa
32,586 Recognized Expert Moderator MVP
Nice to have some poetry in here :)
BTW I edited your post as you seemed to be signing it as Linq rather than addressing it to him (that is his signature rather than his handle when done with the smiley).
Feb 9 '08 #6

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

Similar topics

4
2280
by: omidmottaghi | last post by:
I need to disable/enable form elements in my form. the code i was developed works fine in FF, but in IE, its behaviour is very strange!! in the form, we have a lot of checkboxes, all of them named like "xyz_np". in front of each checkbox, we have some fields, named "xyz" this is my JS code. after clicking on checkboxes:
6
3443
by: ML.Steve | last post by:
Hi, There are lots of posts on this subject but after a couple of hours of going though them I still can't get a number of fields to be disabled when a checkbox is ticked. Basically I have a lot of Forecast and Actual dates that can be entered, and next to each one an 'NA' checkbox that I want to disable/grey-out both dates (and the JavaScript calendar if possible). It also only has to work on Internet Explorer 6, as it is for...
4
2274
by: louise raisbeck | last post by:
Hi there, I have put some web controls, textboxes and drop down lists, in a Panel, so that under a certain condition i can disable all fields for input. I read in Help that disabling a Panel control (enabled=false) will disable all child controls within it - just what i want. but it just doesnt work. panMyPanel.Enabled=false; does absolutely nothing. panMyPanel.Visible=false does hide the whole section, so i know i'm referencing it...
6
2564
by: sonic | last post by:
Hi, I am experimenting with different viewstate management ideas for large datagrids, and found a microsoft suggestion to turn it off, and only store relevant information by manually accessing viewstate. as per some helpful suggestins in MSDN "Common DataGrid Mistakes" http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-commondatagridmistakes.asp they suggest disabling datagrid viewstate and adding...
3
1630
by: PB | last post by:
What is the rationalle for disabling JavaScript. AFAIK, the primary reason is for "security purposes" - but what specific kind of threats does the protect against? AND - is the disabling of JavaScript something that is done very much? I know it's impossible to answer that last question definitively - so I'm wondering if it has presented any of you with any real problems in the day-to-day running of your Web applications (i.e. support...
1
1267
by: John | last post by:
Hi, I have a subform with some fields in them. i only want a customer to enter a property ID, so how can i stop the user from editing the customer ID, quantity, etc... how can i stop the user from entering data into other fields in the subform? Thank You
1
4273
by: Sofie | last post by:
hi, i have a form with a lot of fields on it. I would like to enable/disable all these fields using a checkbox. Is there a way to do this (perhaps using a loop mayb), without having to name each field and disable it - which would result in too many lines of code? Any help would be appreciated! thanks!
3
7162
by: Timas | last post by:
Hi I'm a bit of a newbie on Access. I'm using Access 2000 and am trying to disable some fields on a form based on the values selected in other fields on the same form. I'm using the AfterUpdate function on the fields to enable / disable the fields: ------------------- Private Sub field1_AfterUpdate() If field1.Value = "Partial" Then txtdoc.Enabled = False
1
2571
by: allamaria | last post by:
I am creating a form in Access, in the form there is a checkbox and some fields. I want to set the checkbox so, that if the user clicks on it, the fields should be enabled, if the checkbox has not been clicked, thann the fields remain disabled. Could you please help me to write the VBA-code for this procedure? Thank you!! Alla
0
10403
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10227
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10984
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...
0
10154
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8545
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
7693
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
6496
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
6660
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5242
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.