Problem with disable/enable related field

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?
 
S

Scott Lichtenberg

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.
 
J

julostarr

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top