Check Box / Text Box Enable Help

Jul 21, 2006

I've got a text box that is disabled, and want it to become enabled when the user clicks the required check box.

I've got the following code, and can't see anything wrong with it, but for some reason it doesn't work. No error message appears, but the text box stays disabled regardless of whether I check the check box or not.


Private Sub Successful_Click()

If chkSuccessful = True Then
txtDateAppointed.Enabled = True
Else
txtDateAppointed.Enabled = False

End If
End Sub

Anyone have any ideas?

Dan

View Replies


ADVERTISEMENT

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

Enable/Disable Event Proceedure With Check Box

Mar 28, 2006

Hi, bit of a noob here. I've searched for a while but I can't find anything related.

I have a data entry form that auto recalls the last entry that was made in it. I did this in an effort to speed up data entry. Anyways, here is the code I use.

Private Sub Investigator_AfterUpdate()
Investigator.DefaultValue = "'" & Investigator.Value & "'"
End Sub

Now the problem is that I want to be able to enable and disable this event proceedure with a check box. Is there a way to do this?

Thanks in advance for all your help.

View 2 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 :: Button To Enable Text Field

Aug 10, 2015

I have all of my text fields disabled and I want the user to press a button to make them enabled. I have a field that links to the database called, "lastName".Under the button's clicked property, I have coded,

Private Sub Command44_Click()
lastName.Enabled = true
End Sub

View 12 Replies View Related

Check Box And Text Box Help

Oct 11, 2004

I'm going to need a check box and text box. What it needs to do is if box is checked the text box becomes active and required but if not checked then the box doesn't need to be required? Any help would be appreciated.

View 1 Replies View Related

Check Box With Invisible Text Box?

Dec 4, 2012

I need code for a check box that has a (Product Impact) text box thats only visible when checked.

View 1 Replies View Related

Check Box And Text Box Link

May 10, 2014

is there a way that once a checkbox is ticked (returns TRUE) can it populate the time, date and current user at the same time. ive got separate fields for this, however, nothing i have tried actually returns any result!

View 10 Replies View Related

Modules & VBA :: How To Check Positioning Of Text

Nov 24, 2014

I am required to write a code to check the positioning of a text in a string.

E.g.

"~[Admin]~xxxxxxxxx~ACK~" = Acknowledged
"~xxxxxxxxx~[Admin]~ACK~" = Not Acknowledged
"~xxxxxxxxx~ACK~[Admin]~" = Not Acknowledged

As you can see, as long as the string starts with "~[Admin]~", it is counted as acknowledged. If the "~[Admin]~" appears anywhere else except the start, it is counted as not acknowledged.

I know I'll have to use If-else statements and EOF to cycle through my entire column, but how do I check the positioning of "~[Admin]~"?

Are there wildcard statements that Access VBA can use similar to SQL's "*"?

View 8 Replies View Related

Modules & VBA :: If Check Box Yes Type Name Of Field In Another Text Box

Jun 9, 2014

i have multpile yes/no check box i want if i check on one the name of this check box is written on another one.
so i neeed a code for loop of check boxes and i need a code i.e loop all check boxes if any is true then put name field in {new field}

View 8 Replies View Related

General :: Using Check Box To Grey Out Certain Text Fields

Oct 24, 2013

I am trying to use a check box to either grey out certain text field(s). For example If the box is checked true then certain fields would become available to input data. If the box is not checked it stays grayed out.

View 8 Replies View Related

Click Check Box And Display Value In Text Box In Access

Feb 27, 2013

I have a form that has a remarks textbox. Depending on the options, the form will write something in that textbox. Now I want to have other options (check boxs) that I can click on which will add to that remarks textbox.

Code:

Private Sub Check27_Click()
If Me.Check27 Then
Me.Remarks = ("Shipping Box/Container")
Else
Me.Remarks = ""
End If
End Sub

View 4 Replies View Related

Check Boxes In A Form To Have Certain Text Print Out?

Apr 18, 2014

I was wondering if there was a way to use check boxes in a form to have certain text print out. It's part of an invoice type form and there are 4 different treatments that could have been part of the appointment and the goal is to have a way to check the treatments for that appointment and only have the checked ones print out..

View 1 Replies View Related

Tables :: Sum Of Time / Output It In Text Box For Valid Check Box

Nov 14, 2013

Basically what I'd like to do is to sum the time, and output it in the text box for the valid check box. For instance (in the picture attachment) if the 'Running' check box is ticked, Access will add 15 minutes to the 'Total Running Time' text box. If 'Running' is checked again on the next Record, Access will add an extra 15 minutes (totalling 30 minutes) to the 'Total Running Time'. On the 3rd Record if 'Down' is checked, Access will add 15 minutes to the 'Total Down Time' text box, the same for 'Change Over'.

View 5 Replies View Related

Forms :: Requery Text Box Based On Check Box Selected

Sep 10, 2014

Is it possible to have a query that will requery value of a check box based on which check box is selected? I have a form that has 5 check boxes and a text field for populating a unit price. When someone clicks a specific check box, the text field should display the unit price. I know how to accomplish this using a combo box and don't want to change the form to setup for a combo box, but rather use what everyone is currently used to. I want to add the check box is from 1 table linked to a form and the unit price is from another table not linked to a form. Both tables have 2 fields in each that will relate.

View 6 Replies View Related

Want Check Box On Switchboard Form To Set A Text Box's Visible Property In A Report

Sep 23, 2004

On my switchboard form, I have a check box which the user can check to make a text box (which appears in several different reports) visible and uncheck to make it invisible. The text box in the reports has the same name on all of them.

I am having trouble making this work.

I can think of two solutions, but haven't had success with either yet.

1. I could simply change the visible property of the report(s) control from the form. This works if the report is open, but throws an error if the report is not open.

Code:Public Sub showNumOrgsInReportCB_AfterUpdate()If Me!showNumOrgsInReportCB.Value = 0 ThenReports![publishZipR]![numOrgsF].Visible = FalseElseReports![publishZipR]![numOrgsF].Visible = TrueEnd IfEnd Sub

Is there a property or function I can use to test whether the report is open before I set the text box visibility?


2. Alternatively, a less elegant solution would be to run an event procedure to close all open reports. This would eliminate that issue, but I haven't gotten the code to work yet:

Code:Public Sub showNumOrgsInReportCB_AfterUpdate() Dim rpt As Report ' Enumerate Reports collection.For Each rpt In ReportsDoCmd.Close rpt.nameNext rptEnd Sub

This line:
DoCmd.Close rpt.name
throws a Run-time Error '13', Type mismatch.

How do I fix that?


I'm open to better ideas!

Thanks

View 2 Replies View Related

Forms :: Label Text Show / Hide Condition With Check Box Value

Jul 24, 2013

I have a report base on my table. Here a check box. I wanna show two label text hide/show base on when check is true or false. It will be when report will be open. I have try this but nothing is happened.

Code:
If AffecteAc= True Then
affected.Visible = True
general.Visible = False
End If

View 1 Replies View Related

Convert A Text String To Integer - Check For Error In Expression Builder

Apr 24, 2013

I would like to convert a text string to integer.

Lots of posts say to use val, but it is not listed in access 2010

So I am trying,

Creating a field that is numeric then just referring to the string field.

This works good except where it finds actual text. It puts the value "#Type!" in there.

Would there be some kind of function to check for an error or check if the value is text.

View 1 Replies View Related

Enable Passwords

Jun 12, 2007

I've created users and groups in my access database and assigned the permissions. My security wizard is not working. How do I enable the secuirty-- force the users to logon with a username and password?

View 3 Replies View Related

Enable Toolbars

Jan 28, 2008

Hello Guys,
I need to know how to enable toolbars and edit a text in a report...
the database is locked by previous employee and I can't get to design view so I can change a text... There isn't any tool bar up there.. just EXIT button..

Thank you in advance.

View 6 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

How Do I Enable Right Clicking?

Dec 20, 2004

Hello everyone. Over the summer i made a database. i think i may have done some locking on it so that i couldnt change it (and only use it), but now i would like to correct some errors. First off, i cant get the database toolbar to show up, and i cant use right-clicking. How do i enable right clicking and get this database to work so i can edit it.

View 1 Replies View Related

Forms :: Make Image Appear In Form When There Is Check In Check Box From Table?

Jun 26, 2014

how can i make a image appear in my form when there is a check in the check box from the table?

View 14 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 View -->Zoom

Sep 13, 2007

Hi there,

The View --> Zoom is in frozen state right now.I am trying to enable the View--> Zoom function but i dont see any option anywhere to set it on.

Please advice.

Thanks
Danny

View 8 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







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