YesNo control event question

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
 
K

Ken Snell [MVP]

Use the AfterUpdate event of the checkbox control to set the Enabled
property of txtCost.
 
G

Gary Schuldt

Thanks to both.

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

Gary
 
G

Guest

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.
 

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