Disable Check Box If!!

Feb 8, 2005

I have a combo box "cboSelectEvent" and a check box "ckPartRepl"

what i want is that if "cboSelectEvent" is like "X120*" then "ckPartRepl" would be disabled.

how should i write this and on which event action should i add this?

i think it should be on the lost focus or afterupdate but not sure.

should this work? i have tried it but the box always appears to be usable
Code:if me.cboSelectEvent = "X120*" thenme.ckPartRepl.enabled = falseelseme.ckPartRepl.enabled = trueend if



cheers

Andy

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

Modules & VBA :: Disable Multiple Textboxes With A Check Box?

Dec 27, 2014

When UseDDelivery is checked the three textboxes should be disable and when the form is opened UseDDelivery is set to be checked by default so the textboxes should be disabled when the form opens but they aren't. the two different ways of doing it are shown below.

Elements specific to my system :UseDDelivery = checkbox
AltDeliveryAddress = textbox1
AltDeliveryTown = textbox 2
AltdeliveryPostcode = textbox3
Solution 1:

Code:
Me.AltDeliveryAddress.Enabled = UseDDelivery.Value
Me.AltDeliveryTown.Enabled = UseDDelivery.Value
Me.AltDeliveryPostcode.Enabled = UseDDelivery.Value

This is a bit of vba a friend wrote for me quickly, it includes all three textboxes but the checkbox enables them instead of disables.

solution 2:

Code:
Private Sub UseDDelivery_AfterUpdate()
If AltDeliveryAddress.Enabled = True Then
AltDeliveryAddress.Enabled = False
Else
AltDeliveryAddress.Enabled = True
End If
End Sub

With this bit of vba I found the checkbox enables the textbox instead of disabling it and I can't figure out how to include the other two textboxes

View 4 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 :: 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

Access Application For Check-in/check-out

Mar 19, 2007

Long time lurker, first time poster.

I'm in need a of a check-in/check-out application for my company. We have about 550-600 employees at any given time and our turnover is about 20-30% per year. Our check-in/check-out process requires our employees to personally visit between 30-40 areas in our company (personnel, safety, credentials, parking, insurance, etc) within the first month of employment. This is currently done manually and is a huge drain on labor, especially when check-in sheets are lost, misplaced or, in some cases, forged.

I'm looking to build a database that would be intranet based, password secure (by check-in area) that would allow the new employee to present at a particular check-in, check-out site, complete that portion of the check-in/out process and then allow the person responsible for the check-in/out to enter the status into the database. At any point in the process, I would want to know the status of the person checking in/out (how long they've been checking in/out and what portion of the process have they completed).

Can this be done in ACCESS?

Thanks

View 1 Replies View Related

Spell Check Contents Works , Need To Suppress The Spell Check Complete Msg Box

Apr 25, 2005

Hi
I have sendkey "{f7}" on loss focus.
this works great as a spell check but then I get the mesage box that spell check is complete.
How do I stop this box from occuring?

View 2 Replies View Related

Disable Min / Max

Sep 8, 2006

Hi

I know how to disable the min / max buttons on a form, but can anybody provide help with disabling the Min / Max buttons of the access application itself, I recently found some code that somebody had posted to disable the "X" button, now I would like to disable the min / max function as well.

Many thanks

Plug

View 3 Replies View Related

Disable Shift Key, F11 Etc..

Oct 31, 2005

Hi,

I am just about to set up user level security for my database. Before I do, how do I disable the holding the shift key thing when opening a database to get into the database window?

I want to make it so the users can't see the database window or access the backend data. As I will need to give permissions to use most of the tables, how is this done?

I am using Version: 2002 (10.0) XP

Any help would be much appreciated.

Thanks

View 1 Replies View Related

Disable The [Shift] Key

Apr 26, 2007

I need to disable the [Shift] key so that when the users open my MS Access database, they cannot by pass the open form and display the database window.

We had code that worked correctly with an MS Access 2000 MDB, and even works with an MS Access 2003 ADP, but the same code is ignored by MS Access 2003 MDB.

We add Module named "DisableByPassKey", here is the code...

Public Function SetProperties(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
On Error GoTo Err_SetProperties

Dim prps As AccessObjectProperties
Dim prp As AccessObjectProperty
Dim isPresent As Boolean


Set prps = Application.CurrentProject.Properties
For Each prp In prps
If (StrComp(prp.Name, strPropName, vbTextCompare) = 0) Then
isPresent = True
Exit For
End If
Next

If (isPresent) Then
prps(strPropName).Value = varPropValue
Else
prps.Add strPropName, varPropValue
End If

Exit_SetProperties:
Exit Function

Err_SetProperties:
If Err = 3270 Then 'Property not found
Properties.Append prp
Resume Next
Else
SetProperties = False
MsgBox "Runtime Error # " & Err.Number & vbCrLf & vbLf & Err.Description
Resume Exit_SetProperties
End If

End Function

The code does not cause an error, it just seems to do nothing. When I set the [Shift] key to "disabled", then re-open the database, the [Shift] key works once again.

If you have any ideas, it would be great.

Thank you!

View 2 Replies View Related

Disable Spaces

Dec 7, 2007

Hi, I have a text box in a from for data entry, how do I disable a space. For example I don't want the user to have a space between charaters or before and after a charater. Thanks.

View 7 Replies View Related

Disable Problem

Jan 19, 2008

The code to disable shift keys at start up that has been posted here numeroous times is causing me problems. I am a complete novice with vba. but i cannot seem to get it to work and there seems to be a problem with the following line of code:-

db.Properties(strPropName) = varPropValue

Can anyone explain what may be going wrong. The shift key still by-passes and no password is asked for. If I do click the button on the start-up screen and enter the password I get error 3270 and the line above is highlighted.

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

Disable Button

Jun 30, 2005

I am not sure but this how it should work in VB, I am trying to disable a button that exists on a different form:

ACAudio!Command89.Enabled = False

Where ACAudio is the name of the form and Command89 is the name of the button but I keep getting an error saying object required.

View 4 Replies View Related

Disable Right Click

Nov 30, 2005

Hi, Im currently creating a database for an A-Level project.
I am required to create a database for a real company.
They have asked me to stop the right click function on forms.
I have disabled almost every feature on the forms, however i cannot find a way to disable right click.
Please help.

Pete

View 4 Replies View Related

Disable Button

Jan 21, 2006

I want to disable the button "cmdNew" unless certain criteria are met. Here is the code that runs in Form_Current :

Private Sub Form_Current()

Me.cmdNext.Enabled = (Me.RecordsetClone.RecordCount > Me.CurrentRecord)
Me.cmdPrevious.Enabled = Me.CurrentRecord > 1
Me.cmdLast.Enabled = (Me.RecordsetClone.RecordCount > Me.CurrentRecord)
Me.cmdFirst.Enabled = Me.CurrentRecord > 1

If (Me.cboStatus.Value = "Approved" Or Me.cboStatus.Value = "Approved as Noted" Or IsNull(Me.cboStatus) Or Me.RecordsetClone.RecordCount > Me.CurrentRecord) Then
Me.cmdNew.Enabled = False
Else
Me.cmdNew.Enabled = True
End If

End Sub

The navigation buttons work flawlessly but the cmdNew button still is enabled when it shouldn't be. THe idea is that is will be disabled if:

-current record is not the last record
-cbostatus is blank(null)
-cbostatus is "approved"
-cbostatus is "approved as noted"

The only code that seems to work is the "me.recordsetclone.recordcount > Me.currentrecord" .

Am I going about this the wrong way? How can I check what is in the cbostatus box and have the cmdnew button enabled/disabled based on its value.

Thank you

View 12 Replies View Related

Disable Menus

Jan 30, 2006

I have the following code in the on_load of all of my forms to disable all menus:Dim i As IntegerFor i = 1 To CommandBars.CountCommandBars(i).Enabled = FalseNext iThe problem is that when I open a report in preview mode I cannot close, print, etc.Two questions:1. Is the above approach the best way to disable all menus and toolbars?2. How do I add a custom toolbar (already created) to the report preview only. I've tried doing in in the properties and by me.toolbar = "custom toolbar." Neither approach works. I suspect that the code I've used to disable the menus is keeping me from adding custom menus where I want them?I should also mention that I have also turned off all of the menus, toolbars, etc. in the options/startup.Thanks for your help!

View 2 Replies View Related

Disable VDU Output

Sep 9, 2006

Hi Everyone

Does anyone know how to disable the vdu output to the screen when loading multiple forms etc.

I have an annoying flicker when my main form is reloading.

Thanks in advance for any help,

Kindest regards

Tony

View 1 Replies View Related

'Enter Key Disable????

Mar 9, 2005

I have one form where I want the 'Enter key to be disabled. What is the best way to disable the 'Enter key for this one form without disable'n it for the entire database?

View 1 Replies View Related

Switchboard (Disable Items)

Jul 18, 2005

Hi Folks,

I have created a switchboard that has 8 more sub switchboards. They have got items from 1 to 8. My database is setup with users and their authorised access levels. Admin has level 1, Manager level 2, Users Level3. Now what i want is that when admin logs in all the items in the switchboard must be available, but when a Manager with leve 2 or a user with level 3 logs in to the database then certain items on a specific Switchboard must be diabled For example lets say Sub Switchboard No 3 and its item number 4 (SwitchboardID = 3 and Item Number 4) should be disabled. I tried searching it on the Forum but no use. All i request you is to help me in this issue.


Warm Regards


Darno

View 2 Replies View Related

Disable Access Control Box X

Mar 29, 2006

I searched the forums for this, but only ran across this (http://www.access-programmers.co.uk/forums/showthread.php?t=98554) reference to the access 97 method. Could you please let me know what the access 2003 method for disabling this close box is or provide me criteria to search the access help files?

View 2 Replies View Related

Mde - Disable Menu Options

Apr 20, 2006

I'd like to disable the options to see the table or query design - and control other thing the user can or can't see.

How can I do that?

View 2 Replies View Related

Disable The Mouse Wheel

Jul 26, 2006

Hi everyone. Listen, is there a way to disable the mouse wheel from scrolling through entries in a form? I would like to do this in order to not confuse and upset the user further in the database I am developing, since they do have to enter data into it. Please help me.

Thanks,
LookingMoney

View 2 Replies View Related

How To Disable The Properties Window

Nov 30, 2006

I was hoping someone knows how to disable the ability for users to gain access to the properties window.

When viewing a form (or any object), one can usually right click, click on the corner of the form, or a few other actions and gain access to the properties option. If selected, the properties window is displayed with all the object's properties.

Is there a way to NOT allow the users to select this option? i.e. to disable this option from the menu list?

Thanks for any help you can provide.

-arm1

View 3 Replies View Related

Disable Button On Toolbar

Mar 5, 2007

Hi all,

This has to be simple, but the solution eludes me.

I have a database that works really weel, but I need to do some tweaking to the toolbars to "grey out" the "sort ascending" and "sort descending" icons so that hte users do not mess with those and change how the recoerds display.

There has to be an easy way to disable those two buttons or an alternate way to ensure that the form basically ignores them.

Thanks

mafhobb

View 6 Replies View Related







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