Forms :: Enable / Disable Checkbox On Continuous Form

Apr 5, 2015

I am asked to create a checklist for a number of tasks to be executed in a particular shift. However in some tasks can be skipped. There are three shifts per day.

To accomplish this i have created a continious form with a number of checkboxes per task which represent the days of the week. The tasks itself are stored in a seperate table with a checkbox per shift (task settings). If the tasks must be performed in a particular shift, the checkbox is activated (= true).

Goal here is, if a task doesn't have to be executed in a shift the task should not be visible on the continious form. The recordsource of the continuous form is a query, which contains a join between the table with the task settings and the table with the tasks performed.

I have placed some code to perform the task in the form's current event

In the continuous form current event I have placed for every checkbox the following code:

Private Sub Form_Current()
If Me. PerformTaskShift.Value = True Then
Me.MaandagOchtend.Enabled = False
End If
End Sub

However when i execute the code and load the form, not only the checkbox in the row mentioned are set invisible, all the rows are. Is there any way to set only the checkboxes on the rows mentioned invisible, in stead of all rows?

View Replies


ADVERTISEMENT

How To Enable/disable Textbox Based On Checkbox Value

Aug 29, 2006

I have 44 checkboxes, each has a textbox next to it. What I want is when the user selects a checkbox, the textbox next to it will be enabled. Also, when the user unselect a checkbox, the textbox next to it will be disabled and any value entered is cleared.

Another way is whenever the user enters a value in a textbox, the checkbox associate with it is selected and vice versa.

View 3 Replies View Related

Forms :: Enable / Disable Navigation Button On Form Load?

Mar 25, 2013

Basically I want to put a code in the "on load" event of a form that enables or disables navigation buttons based on a value in a table (the table has 1 record and 1 column).

So if the value is "A", I want to hide navigation buttons on load; if it is "B", I want to show navigation buttons on load.

I know I can set this property in each form, but I have a number of forms that I want to configure at the same time.

My problem is that I don't know how to reference the value in the table.

View 3 Replies View Related

Forms :: Disable / Lock Fields On Form And Subform Based On Checkbox

Feb 15, 2014

I am trying to lock records on a form and subform after a checkbox has been ticked, have used the code below from a previous post.

Private Sub Form_Current()
If Locked = -1 Then
Me.AllowEdits = False
Me.AllowAdditions = False
Me.AllowDeletions = False

[Code] .....

This is locking the Main form records is there a way to code this so that the fields on the subform are also locked when the checkbox is ticked?

View 7 Replies View Related

Forms :: Can't Enable Checkbox In A Subform

Aug 12, 2013

I have a subform in datasheet view. In the main form I have various combo boxes to filter the data in the subform. I want to be able to check off the checkbox in the subform then filter all records that are checked, however, I am not able to check any of the checkboxes when I'm in my main form.

Example:
Sales Region, Order Date, are two fields

I can go in and select "north", "5/20/2013" then filter and let's say I get 55 records

So within the north region on 5/20/2013 I only want to select 5 of the 55 records by checking them off in the subform then in the main form I would drop down the unbound combo box to 'yes' and it would give me all records in the 'north' region with an order date of '5/20/2013' that I checked which should be 5 in this case. But, it won't let me check the box in the subform.

View 3 Replies View Related

Enable/disable All Controls On Form

Jan 10, 2008

Hello. I have a form with a million little buttons on it (don't get me started, I didn't design it! - heh)...

Depending upon which user is running the mdb, I would like all but 16 (of the 80 or so) objects/controls disabled/enabled. I would like to autodisable all the controls, then enable the subset (or all of them) depending who the current user is.

SO in short, other than individually disabling/enabling the many items, is there a magic command for vba, similar to enable *.* for controls [silly e.g., but I hope you get my point...]

Thoughts!

Thanks!
-madEG

View 2 Replies View Related

Forms :: Enable / Disable Button Based On Textbox

Aug 12, 2013

I'm trying to have a button in a form that, when clicked, will time stamp a text box already formatted for time. But once the text box is filled with a time, the button then disables itself for that record.

If I switch to another record where the text box is empty, the button will enable itself without closing the form, but obviously re-disable itself if I go to a record the text box is filled.

I'm sure I could use conditional formatting for it, but I don't think I'm going about it the right way. I already got a basic button built to timestamp.

View 5 Replies View Related

Forms :: Disable / Enable Fields Not Working For A New Record

Aug 9, 2014

I have some code like this that sets some fields up to be disabled when the form loads, then enables them when a combo box ('Type') is selected to 'Instrument'. This works fine as far as it goes, but if the user has selected 'Instrument' and then goes to a new record, the fields remain enabled.

Private Sub Form_Load()
Me.CalibrationTolerance.Enabled = False
Me.AcceptanceLimit.Enabled = False
End Sub

[Code] ....

I've looked this up and it appears I need to use the property Form.NewRecord, but nothing I do seems to make it work.

View 8 Replies View Related

Forms :: Enable / Disable Check Boxes Based On Combo Box Selection

Jun 17, 2015

im trying to enable/disable checkboxes based on a combobox selection for instance,

i make the selection in a combo box called terms and conditions. i want it then to only enable the business,domestic and summary check boxes for that type, with the onther check boxes staying disabled. is there a way this can be done through code like the statement "only enable if this letter type selection has been selected"

View 14 Replies View Related

Forms :: Function To Enable / Disable Button Depending On Files Imported Or Not

May 20, 2015

I have 3 macro importing 3 files, and then another button to process those data.

So, I need a function to enable/disable the button depending on the files have been imported or not.

View 1 Replies View Related

Modules & VBA :: Look Up A Value In Table That Enable Or Disable Subform In Main Form

May 20, 2015

I have written code to look up a value in a table that then enables or disables a subform in my main form. The code works, but I know it is now as efficient as it can be. The main problem is that I have multiple values that determine if the subform should be enabled or disabled. I would like to use an IN statement but I'm pretty sure this doesn't work for Dlookup. Below is an example of the code I currently have:

Code:
Sub enablecontrols(setting As Boolean)
Inv_subform.Enabled = setting
End Sub
Private Sub Form_Current()

[Code] ....

Like I said, this works fine, but I am concerned if I need to add more items to look up and the stability of the code in general.

View 3 Replies View Related

Checkbox Filter On Continuous Form

May 27, 2015

On my continuous form, I have a field that is a checkbox. I would like to place an unbound checkbox/radiobutton in the form header so that when the it is checked, it will display only records that are checked, and when it is unchecked, it will only display records that are unchecked.

View 2 Replies View Related

Forms :: Checkbox To Select Record In Continuous Subform

May 22, 2015

I have a continuous subform linked in a data query, I added some check box to select for each record. However, everytime I check a checkbox, it also check the same checkbox on the next record.

My check box consists of Shipping options - FEDEX, COURIER and HAND DELIVERY. These are the options I need to check for each records in the subform.

Is there a way I can select different checkbox for each record?

View 7 Replies View Related

Yes/no Enable Disable

May 23, 2005

Here is my problem: When a certain yes/no box is true (checked) other fields on the form are not enabled. That works just find when I am on the record that I click the yes/no field. When I go to another record and then go back to the previous record the fields that should be disabled due to a certain yes/no box being true are now enabled and not disabled. Below is my code. Can anyone tell me what I am doing wrong?

Private Sub Form_Current()

SetCheckBoxes

End Sub

Private Sub SetCheckBoxes()

If Me.StaPrimary = True Then
Me.StaUp.Enabled = False
Me.StaUpTrainerFirstName.Enabled = False
Me.StaUpTrainerLastName.Enabled = False
Me.StaUpVerifyDate.Enabled = False
Me.StaUpReverifyDate.Enabled = False
Me.StaBack.Enabled = False
Me.StaBackTrainerFirstName.Enabled = False
Me.StaBackTrainerLastName.Enabled = False
Me.StaBackVerifyDate.Enabled = False
Me.StaBackReverifyDate.Enabled = False
Me.StaOther.Enabled = False
Me.StaOtherTrainerFirstName.Enabled = False
Me.StaOtherTrainerLastName.Enabled = False
Me.StaOtherVerifyDate.Enabled = False
Me.StaOtherReverifyDate.Enabled = False
End If

If Me.StaPrimary = False Then
Me.StaUp.Enabled = True
Me.StaUpTrainerFirstName.Enabled = True
Me.StaUpTrainerLastName.Enabled = True
Me.StaUpVerifyDate.Enabled = True
Me.StaUpReverifyDate.Enabled = True
Me.StaBack.Enabled = True
Me.StaBackTrainerFirstName.Enabled = True
Me.StaBackTrainerLastName.Enabled = True
Me.StaBackVerifyDate.Enabled = True
Me.StaBackReverifyDate.Enabled = True
Me.StaOther.Enabled = True
Me.StaOtherTrainerFirstName.Enabled = True
Me.StaOtherTrainerLastName.Enabled = True
Me.StaOtherVerifyDate.Enabled = True
Me.StaOtherReverifyDate.Enabled = True
Me.StaPrimaryVerifyDate = ""
Me.StaPrimaryReVerifyDate = ""

End If

If Me.StaUp = True Then
Me.StaPrimary.Enabled = False
Me.StaPrimaryTrainerFirstName.Enabled = False
Me.StaPrimaryTrainerLastName.Enabled = False
Me.StaPrimaryVerifyDate.Enabled = False
Me.StaPrimaryReVerifyDate.Enabled = False
Me.StaBack.Enabled = False
Me.StaBackTrainerFirstName.Enabled = False
Me.StaBackTrainerLastName.Enabled = False
Me.StaBackVerifyDate.Enabled = False
Me.StaBackReverifyDate.Enabled = False
Me.StaOther.Enabled = False
Me.StaOtherTrainerFirstName.Enabled = False
Me.StaOtherTrainerLastName.Enabled = False
Me.StaOtherVerifyDate.Enabled = False
Me.StaOtherReverifyDate.Enabled = False
End If

If Me.StaUp = False Then
Me.StaPrimary.Enabled = True
Me.StaPrimaryTrainerFirstName.Enabled = True
Me.StaPrimaryTrainerLastName.Enabled = True
Me.StaPrimaryVerifyDate.Enabled = True
Me.StaPrimaryReVerifyDate.Enabled = True
Me.StaBack.Enabled = True
Me.StaBackTrainerFirstName.Enabled = True
Me.StaBackTrainerLastName.Enabled = True
Me.StaBackVerifyDate.Enabled = True
Me.StaBackReverifyDate.Enabled = True
Me.StaOther.Enabled = True
Me.StaOtherTrainerFirstName.Enabled = True
Me.StaOtherTrainerLastName.Enabled = True
Me.StaOtherVerifyDate.Enabled = True
Me.StaOtherReverifyDate.Enabled = True
Me.StaUpVerifyDate = ""
Me.StaUpReverifyDate = ""

End If

If Me.StaBack = True Then
Me.StaPrimary.Enabled = False
Me.StaPrimaryTrainerFirstName.Enabled = False
Me.StaPrimaryTrainerLastName.Enabled = False
Me.StaPrimaryVerifyDate.Enabled = False
Me.StaPrimaryReVerifyDate.Enabled = False
Me.StaUp.Enabled = False
Me.StaUpTrainerFirstName.Enabled = False
Me.StaUpTrainerLastName.Enabled = False
Me.StaUpVerifyDate.Enabled = False
Me.StaUpReverifyDate.Enabled = False
Me.StaOther.Enabled = False
Me.StaOtherTrainerFirstName.Enabled = False
Me.StaOtherTrainerLastName.Enabled = False
Me.StaOtherVerifyDate.Enabled = False
Me.StaOtherReverifyDate.Enabled = False
End If

If Me.StaBack = False Then
Me.StaPrimary.Enabled = True
Me.StaPrimaryTrainerFirstName.Enabled = True
Me.StaPrimaryTrainerLastName.Enabled = True
Me.StaPrimaryVerifyDate.Enabled = True
Me.StaPrimaryReVerifyDate.Enabled = True
Me.StaUp.Enabled = True
Me.StaUpTrainerFirstName.Enabled = True
Me.StaUpTrainerLastName.Enabled = True
Me.StaUpVerifyDate.Enabled = True
Me.StaUpReverifyDate.Enabled = True
Me.StaOther.Enabled = True
Me.StaOtherTrainerFirstName.Enabled = True
Me.StaOtherTrainerLastName.Enabled = True
Me.StaOtherVerifyDate.Enabled = True
Me.StaOtherReverifyDate.Enabled = True
Me.StaBackVerifyDate = ""
Me.StaBackReverifyDate = ""

End If

If Me.StaOther = True Then
Me.StaPrimary.Enabled = False
Me.StaPrimaryTrainerFirstName.Enabled = False
Me.StaPrimaryTrainerLastName.Enabled = False
Me.StaPrimaryVerifyDate.Enabled = False
Me.StaPrimaryReVerifyDate.Enabled = False
Me.StaUp.Enabled = False
Me.StaUpTrainerFirstName.Enabled = False
Me.StaUpTrainerLastName.Enabled = False
Me.StaUpVerifyDate.Enabled = False
Me.StaUpReverifyDate.Enabled = False
Me.StaBack.Enabled = False
Me.StaBackTrainerFirstName.Enabled = False
Me.StaBackTrainerLastName.Enabled = False
Me.StaBackVerifyDate.Enabled = False
Me.StaBackReverifyDate.Enabled = False
End If

If Me.StaOther = False Then
Me.StaPrimary.Enabled = True
Me.StaPrimaryTrainerFirstName.Enabled = True
Me.StaPrimaryTrainerLastName.Enabled = True
Me.StaPrimaryVerifyDate.Enabled = True
Me.StaPrimaryReVerifyDate.Enabled = True
Me.StaUp.Enabled = True
Me.StaUpTrainerFirstName.Enabled = True
Me.StaUpTrainerLastName.Enabled = True
Me.StaUpVerifyDate.Enabled = True
Me.StaUpReverifyDate.Enabled = True
Me.StaBack.Enabled = True
Me.StaBackTrainerFirstName.Enabled = True
Me.StaBackTrainerLastName.Enabled = True
Me.StaBackVerifyDate.Enabled = True
Me.StaBackReverifyDate.Enabled = True
Me.StaOtherVerifyDate = ""
Me.StaOtherReverifyDate = ""

End If

End Sub

View 8 Replies View Related

Enable/Disable BypassKey

May 1, 2007

On searching the forum, I found the following post for enabling/disabling BypassKey. I did as instructed but on clicking the label, it gives 'syntax error with 'On Error Goto' in red color and highlighted.

Hello af1112 welcome to the Forum...

I use this code that ghudson supplied at the beginning of this post.

First of all create a copy of your db (Just incase.. )

Now......

Create a label on a form somewhere and make it invisible to other users
(I have mine hidden in my main Switchboard)

The idea is that by clicking on the label you can activate/de activate the code without anyone else knowing about what you are doing..

Name the label "bDisableBypassKey" & hide it somewhere in the corner of your screen or something.

Copy & Paste the code inbetween the bold text to the onclick event of the label you have just created


Private Sub bDisableBypassKey_Click()

On Error GoTo
Err_bDisableBypassKey_Click
'This ensures the user is the programmer needing to disable the Bypass Key
Dim strInput As String
Dim strMsg As String
Beep
strMsg = "Do you want to enable the Bypass Key?" & vbCrLf & vbLf & "Please key the programmer's password to enable the Bypass Key."
strInput = InputBox(Prompt:=strMsg, Title:="Disable Bypass Key Password")
If strInput = "MY PASSWORD" Then 'Change password to your own
ChangeProperty "AllowBypassKey", DB_BOOLEAN, True

Beep
MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & "The Shift key will allow the users to bypass the startup options the next time the database is opened.", vbInformation, "Set Startup Properties"
Else
Beep
ChangeProperty "AllowBypassKey", DB_BOOLEAN, False

MsgBox "Incorrect ''AllowBypassKey'' Password!" & vbCrLf & vbLf & "The Bypass Key was disabled." & vbCrLf & vbLf & "The Shift key will NOT allow the users to bypass the startup options the next time the database is opened.", vbCritical, "Invalid Password"
Exit Sub
End If
Exit_bDisableBypassKey_Click:
Exit Sub
Err_bDisableBypassKey_Click:
MsgBox "bDisableBypassKey_Click", Err.Number, Err.Description
Resume Exit_bDisableBypassKey_Click

End Sub


Now paste this code in the Double click event of the same label

Private Sub bDisableBypassKey_DblClick(Cancel As Integer)
Private Sub Disable_Click()
Option Compare Database

Option Explicit

Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer

Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If

End Function

To Test
click on your label to activate the password prompt
and type in the wrong password (that will now disable the bypass key) and you will not be able to open the db by holding down the Shift button

to disable enter the correct password and you will be able to use the Shift button

Would someone help?

View 4 Replies View Related

Enable/Disable Entries

May 9, 2006

Hi there I am new to Access and I am currently modifying an existing DB. Currently this DB has a main table which holds a bunch of Patient info such as:

Name
Age
AssignedStaff
Condition
etc....

The assigned staff field is populated from another table (Staff), which holds all the staff members working at the institution. However a couple of these individuals have left and they no longer want their name to show up on the form when inserting a new record. However we do want there name to still be in the DB for historical reporting purposes......My intital thought was to create another field in the Staff table that would hold either a "Active" or "Inactive" entry. Then just have a simple If statement to see if the staff member is active or inactive. Does anyone see any problems with this solution or propose a more efficient method.

Thanks

View 1 Replies View Related

Enable/Disable Not Working

Aug 2, 2005

I am creating a data entry form with combo boxes related to two different tables:
TblEducationID
EducationID - Auto# PK
Education - Text
TblMediaFill
MediaFillID - auto# PK
Incubation Time- text
Incubation Temp - text

In my form, I have a combo box that the user selects the Education Type (Media Fill Test; Aseptic Technique Observation, Watch Video, etc....)

I want the incubation time and temp text boxes to be disabled unless Media Fill Test (ID#4) is selected on the first combo box. (I get a Procedure Declaration does not match error.)

Private Sub EducationID_AfterUpdate()
If EducationID = 4 Then
IncubationTime.Enabled = True
IncubationTemp.Enabled = True
Else
IncubationTime.Enabled = False
IncubationTemp.Enabled = False
End If

End Sub

Any Suggestions? Thanks,
Jason

View 2 Replies View Related

Enable / Disable Label

Feb 28, 2006

I've used a form with labels for building a menu options
¿How can I do to enabled or disables a label ? (each label is a menu option)

I've tried to use:
label1.Enables = True

but don't work

Would you help me ?

Thanks a lot
Carlos

View 1 Replies View Related

Enable / Disable Label

Feb 28, 2006

I've used a form with labels for building a menu options
¿How can I do to enabled or disables a label ? (each label is a menu option)

I've tried to use:
label1.Enabled = True

but don't work

Would you help me ?

Thanks a lot
Carlos

View 2 Replies View Related

Enable / Disable Check

Nov 23, 2006

I have the following which works

Private Sub A300_Completed_AfterUpdate()
If A300_Completed = True Then
A300_Date.Enabled = False
User1.Enabled = False
Else
A300_Date.Enabled = True
User1.Enabled = True
End If
End Sub

for some reason when creating a new record the above disabled/enabled fields retain the same property of the last records check? The form in a single (not a continuous)

**A300_Completed is a check box

Can anyone help please? Thanyou

View 5 Replies View Related

Forms :: Use One Field To Enable Or Disable Another Field

Jun 10, 2013

I have a form with a checkbox (Is a Work Permit required?)and a date field (Work Permit Expiration date). I want the date field to be dimmed when the form opens. I want the focus to go to the checkbox first. The checkbox asks whether a youth is required to have a Work Permit. if the user checks the box (the youth needs a Work Permit), then I want the date field to be undimmed and available to the user to put in the Work Permit Expiration date.

I've tried using the checkbox afterupdate property to enable/disable the Work Permit Expiration date field, but no luck. What am I doing wrong? How do I make this work?

Private Sub WorkPermit_AfterUpdate()
If Me.WorkPermit.Value = -1 Then
Me.WorkPermitExpiration.Enabled = True
Else: Me.WorkPermitExpiration.Enabled = False
End If
End Sub

View 8 Replies View Related

Need To Enable/Disable Fields In Access

May 1, 2008

Hi guys, I have a huge problem with a table I'm currently making and I was hoping you could help.

I have created a field in one of my tables using a Combobox lookup that only allows users to enter one of two options. What I want to do is restrict the other fields that a user can enter data into based on the their selection in the lookup field.

i.e if they select the first option then they can see and enter data into a few additional fields (but not others). Likewise if they select the second option they see/dont see other fields.

I am using Microsoft Access 2003.

View 1 Replies View Related

Need To Enable/Disable Fields In Access

May 1, 2008

Hi guys, I have a huge problem with a table I'm currently making and I was hoping you could help.

I have created a field in one of my tables using a Combobox lookup that only allows users to enter one of two options. What I want to do is restrict the other fields that a user can enter data into based on the their selection in the lookup field.

i.e if they select the first option then they can see and enter data into a few additional fields (but not others). Likewise if they select the second option they see/dont see other fields.

I am using Microsoft Access 2003.

View 2 Replies View Related

Access Information, Disable Enable.....

Jun 19, 2006

Hi.
Lets say i have a (Yes/No) combo box and a text box.
I have it so if my combo box says Yes the text box must become enabled so i can type in it.
The problem comes in when I goto a new record, the combo box is still enabled.
I have tried putting the text box to disabled in form_load, but then when I go back to view other records the text box is disabled and the combo box is already set to Yes.

How do i overcome both these problems at the same time ??

View 2 Replies View Related

Disable / Enable Full Menus

Feb 19, 2008

I accidently unchecked the "allow full menus" option in Tools - Startup. When I did that, the menu bar at the top of my database no longer displayed the "Tools" option.

Does anyone know how I can restore the full menus option?

I am new to access and can do nothing with my database until I get my menus back.

Thanks,

View 2 Replies View Related

Enable/Disable 3 Texts Boxes At Same Time

Mar 11, 2008

Hello,
I would be very greatful if someone could help me. I have a Combo box called "COM01" which i want it to control the enable function of 3 Text Boxes TXT01,TXT02 and TXT03.
When COM01 dropdown menu is used and field No is selected i want the 3 Text Boxes above to be set to Enable (False). The reverse when option Yes is selected is required for the same Text Boxes Enable (True)
I will be adding the code to the Change() of the COM01 properties
I have tried to use Case statments without success.
Any help is greatly needed

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved