Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto check

Status
Not open for further replies.

edmac2

Technical User
May 11, 2000
24
US
I have a text box that I would like to enter a date in, when I do I would like to have an option group that contains 2 options used and unused make the used box active, if I remove the date I would like the unused box active, is there a way of doing this with Access 97?
 
Ok. You're most likely not very amused by my last answer so let me tell you what I did.

1) placed a textbox called txtMyDate on a form.

2) placed an option group called Frame7 on my form.

3) placed two option buttons on this option group (names irrelevant) and made them locked.

4) in the OnExit event of txtMyDate I typed this code:
Me.Frame7.Value = IIf(IsDate(Me.txtMyDate), 1, 2)

this asumes that used is first and unused is second. It also asumes that if something is entered in the field then a valid date is used, anything else is unused.

If you wanted to have more than two options you would need a case statement or some such thing but the theory is the same.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top