
Signature
Dave Hargis, Microsoft Access MVP
> > Where you put the code depends on how the form works. If this needs to be
> > checked for each record, use the form current event:
[quoted text clipped - 36 lines]
>
> Thanks
> If you put the code in the Form Current event, it should take care of
> resetting the button for each record. If that is not what you are trying to
[quoted text clipped - 45 lines]
>
> - Show quoted text -
It does reset the button for each record, however the change to the
button is not instant.
So the default setting for the field is A=1 thus button is disabled.
When I change to A=2, the button is not enabled until I go to another
record and then return to the same record. (i.e. save and refresh)
Linq Adams - 05 Feb 2008 16:11 GMT
You need your code in the AfterUpdate event of your textbox A for the change
to take place immediately. You still need it, of course, in the Form_Current
event to persist this when returning to records.

Signature
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000/2003
Klatuu - 05 Feb 2008 16:48 GMT
Linq is correct. I would suggest you put the code in a sub in your form
module and call it from the After Update event of A and from the Form Current
event. That way you only have one place to make changes.

Signature
Dave Hargis, Microsoft Access MVP
> > If you put the code in the Form Current event, it should take care of
> > resetting the button for each record. If that is not what you are trying to
[quoted text clipped - 53 lines]
> When I change to A=2, the button is not enabled until I go to another
> record and then return to the same record. (i.e. save and refresh)