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

Disabling fields

68
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 1391
NeoPa
32,556 Expert Mod 16PB
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
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 Expert 2GB
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
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,556 Expert Mod 16PB
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
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...
6
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...
4
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...
6
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...
3
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...
1
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...
1
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...
3
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...
1
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...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
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
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,...

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.