I am working on an Access 2000 form. One field is a combo box with a default
value of N/A. The second is a text box. Is there a way that will
automatically change the combo box to Yes whenever information is typed into
the text box?
You could use the AfterUpdate event procedure of the text box to assign a
value to the combo.
However, I'm not sure it makes sense to store both fields in your table.
Would there ever be cases where the text box could be blank, but the combo
should show Yes? If not, omit the combo's field from your table. You can
still have a text box on your form, with this in its Control Source:
=IIf([Text99] Is Null, "N/a", "Yes")
substituting your text box name for Text99.
This way, it can never be wrong.
If you want to go ahead and store the value using the AfterUpdate event of
the text box anyway, see:
Calculated fields
at:
http://allenbrowne.com/casu-14.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I am working on an Access 2000 form. One field is a combo box with a
>default
> value of N/A. The second is a text box. Is there a way that will
> automatically change the combo box to Yes whenever information is typed
> into
> the text box?
bhd50 - 29 Feb 2008 03:53 GMT
Excellent feedback. I will use your advice. Thank you very much. You got
me out of a jam.
> You could use the AfterUpdate event procedure of the text box to assign a
> value to the combo.
[quoted text clipped - 19 lines]
> > into
> > the text box?