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
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
As far as I know Label controls can't be enabled or disabled.
 
Upvote 0
Yeah, I figured that would be the case. Thanks for your response, I appreciate it.

- BC
 
Last edited:
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,186
Members
448,554
Latest member
Gleisner2

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
Back
Top