Tucker81
Tucker81

Reputation: 7

Disable Button on Access Form Based on Drop Down Selection

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

Upvotes: 0

Views: 166

Answers (1)

June7
June7

Reputation: 21389

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

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

Or use Visible property if you prefer.

Upvotes: 2

Related Questions