Command Button

B

Bill

Morning,

I have a form that contains a combo box and three command
buttons. What I would like to do is have two of the
three command buttons disabled until an item is selected
in the combo box. The third command button would be
active. This button is a "Cancel" button.

Anyone have any idea how to do this?

Thanks
 
R

Rick Brandt

Bill said:
Morning,

I have a form that contains a combo box and three command
buttons. What I would like to do is have two of the
three command buttons disabled until an item is selected
in the combo box. The third command button would be
active. This button is a "Cancel" button.

Anyone have any idea how to do this?

In the AfterUpdate event of the ComboBox...

Me.CommanButton1.Enabled = Not IsNull(Me.ComboBoxName)
Me.CommanButton2.Enabled = Not IsNull(Me.ComboBoxName)

The buttons should default to disabled of course.
 
Top