Home > Net >  Disable Button on Access Form Based on Drop Down Selection
Disable Button on Access Form Based on Drop Down Selection

Time:12-21

I have an Access form with a couple of buttons that I want to disable based on the drop down selection of another field.

When the Status dropdown is set to "Closed" I want the "Add" buttons to be disabled, disappear, or inactive for people to use. I also need the buttons to be reactivated if the job is reopened.

I thought I would use the OnCurrent attribute but so far I can't figure out the correct code to make it happen.

Thank you.

Example

CodePudding user response:

Place code in form Current as well as combobox AfterUpdate events.

Me.buttonname.Enabled = Me.comboboxname <> "Closed"

Or use Visible property if you prefer.

  • Related