Conditionally Enable a Button Based on Value of a Field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a button (Command96) that I want to enable only if a certain value ([WIP Primary]="Yes") in a field is met. How do can I do this

Stev
 
The code to do this is simple:

Me.Command96.Enabled = (Me.[WIP Primary].Value = "Yes")


The trick is to identify which event should run this code step. You may want
to use the AfterUpdate event of the WIP Primary control:

Private Sub WIP_Primary_AfterUpdate()
Me.Command96.Enabled = (Me.[WIP Primary].Value = "Yes")
End Sub


--
Ken Snell
<MS ACCESS MVP>

Steve Johanson said:
I have a button (Command96) that I want to enable only if a certain value
([WIP Primary]="Yes") in a field is met. How do can I do this?
 
Back
Top