Problem with disable/enable related field

  • Thread starter Thread starter julostarr
  • Start date Start date
J

julostarr

I’m using a code on a field to disable/enable another field based on a
checkbox. I’m using this code on both the Before and After Update Events.
The only problem is that the field is still enabled until the check box is
check for the first time. If I check the box and then uncheck it then the
other field is disabled. The code I’m using is:

Me![Checkbox].Enabled = Me![OtherField]


I have also tried an If condition expression, but it works exactly the same.
Is there any way to change this?
 
If you are looking to enable/disable a field on an already existing record
(based on the value in your check box) try putting some code in the
OnCurrent event of the form. This is executed as you move into the record.
 
That worked. Thanks!
--
julostarr


Scott Lichtenberg said:
If you are looking to enable/disable a field on an already existing record
(based on the value in your check box) try putting some code in the
OnCurrent event of the form. This is executed as you move into the record.


julostarr said:
I’m using a code on a field to disable/enable another field based on a
checkbox. I’m using this code on both the Before and After Update Events.
The only problem is that the field is still enabled until the check box is
check for the first time. If I check the box and then uncheck it then the
other field is disabled. The code I’m using is:

Me![Checkbox].Enabled = Me![OtherField]


I have also tried an If condition expression, but it works exactly the
same.
Is there any way to change this?
 
Back
Top