Disable Label Button in Access Form after Clicked

boldcode

Active Member
Joined
Mar 12, 2010
Messages
347
Hello,

For some reason I thought I had my code right, but how do I disable a "Label" button not a "Command" button on an Access form. I thought the code was this:

Code:
Me.txtTaxRate.SetFocus
Me.lbTurn.Enabled = False

This does not work, any suggestions?

- BC
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,216
Office Version
  1. 365
Platform
  1. Windows
As far as I know Label controls can't be enabled or disabled.
 

boldcode

Active Member
Joined
Mar 12, 2010
Messages
347
Yeah, I figured that would be the case. Thanks for your response, I appreciate it.

- BC
 
Last edited:

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,019
Office Version
  1. 365
Platform
  1. Windows
Is the label attached to the control? If it is, it inherits the 'clickable' aspect of the parent control, so if the control is disabled, the label is too and vice versa. If you want some sort of event separation, you have to 'unlink' the label from the control. Not sure which of all the controls this applies to, and exactly which events, but it applies to a textbox click at least.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,335
Messages
5,595,573
Members
413,996
Latest member
mabelO

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top