Enable/disable a button based on a cbo box (for current record) (1 Viewer)

MGF23

New member
Local time
Today, 15:42
Joined
Aug 28, 2020
Messages
5
Hi Folks,

I have a button on my form which is enabled/disable based on a selection in a combo box. This is the code im using:

Private Sub CCIR_Required_Change()

If Me.CCIR_Required.Column(0) = "YES" Then
Me.Command1176.Enabled = True
Else
Me.Command1176.Enabled = False
End If

However, if i select No then the command button 1176 stays disabled on the form for all other records (even if 'yes' was selected on a previous record). How can i have this functionality based on the current record? Do i need to reference the records PK?

Many thanks!
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 15:42
Joined
Jul 9, 2003
Messages
16,245
Try calling "CCIR_Required_Change()" from the forms on Current event...
 

Users who are viewing this thread

Top Bottom