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

disabling all fields on a form

1
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!
Aug 11 '06 #1
1 3958
MMcCarthy
14,534 Expert Mod 8TB
You could always set the Form to disallow Edits

Private Sub Form_Load()

If <some condition> Then ' (example checkbox = -1)
Me.AllowEdits = False
Else
Me.AllowEdits = True
End If

End Sub

I would recommend that you also look at setting the AllowAdditions and AllowDeletions to false.
Aug 12 '06 #2

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

Similar topics

15
by: Hal Robertson | last post by:
I have created a rather complicated series of html forms for a data entry wizard In my mozilla browser, every time I submit each form along the process, it asks me if I want to remember the...
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...
5
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main...
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...
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...
5
by: KingKen | last post by:
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...
3
by: Jim Armstrong | last post by:
Hello all - This is driving me crazy. I have a table called tblClients - very simple, has the following fields: taxID (PK) ClientName SalesName The main form of my application allows a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.