YesNo control event question

  • Thread starter Thread starter Gary Schuldt
  • Start date Start date
G

Gary Schuldt

I have a y/n text (ynGift) on a form. There is another text box txtCost on
the same form.

Here's the logic I want to implement:

If the user "checks" the box, I want to set txtCost.Enabled = False;
If the user "unchecks" the box, I want to set txtCost.Enabled = True;

I'm not sure which ynGift event I should be keying on to invoke the logic:
OnClick? AfterUpdate? Other?

E.g., I'm not sure, when the Click event fires, does ynGift have the
"right" value?

Gary
 
Use the AfterUpdate event of the checkbox control to set the Enabled
property of txtCost.
 
Thanks to both.

I could also use Klatuu's code on the Load event if the record is not New.

Gary
 
Actually, I think it should go in the Current event. The Load event will
only work for the first record. The Current event fires each time you move
to another record.
 
Back
Top