Dim a command button

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a command button on a form. This button runs a
macro that sets a date. The button should only be used
when an unrelated field is null. How do I make the command
button dim when the unrelated field contains a value?
 
John said:
I have a command button on a form. This button runs a
macro that sets a date. The button should only be used
when an unrelated field is null. How do I make the command
button dim when the unrelated field contains a value?


You can use the unrelated text box's AfterUpdate event to
manipulate the button:

Me.button.Enabled = IsNull(Me.unrelated)

Use the same line of code in the Form's Current event to
sync the button to the field when the record is first
displayed.
 
Back
Top