If Then Else? (1 Viewer)

D

D B Lawson

Guest
How do I make a field active only if the result of the previous check box field = yes?
For example: Info to be sent "yes", enter details of info sent.
 

R. Hicks

AWF VIP
Local time
Yesterday, 23:54
Joined
Dec 23, 1999
Messages
619
I can only go with the vague information you have given. I think you are using only a checkbox and not a option group. I also think maybe you want to enable textbox if there is a check in the check box. I am assuming this info. This being the case try the code below.

Set your text box enabled property to false.
Set the default value property of the check box to 0. Add this code to the On Click event of the check box:

Private Sub chkYourCheckBox_Click()
If Me![chkYourCheckBox] = -1 Then
Me![txtYourTextBox].Enabled = True
Else
Me![txtYourTextBox].Enabled = False
End If
End Sub

This will enable the textbox (txtYourTextBox) when there is a check in the box, and disable the text box when it's empty.

If I have misunderstood your intentions please let me know and I (or someone) will respond to your needs.

Good Luck
RDH

[This message has been edited by R. Hicks (edited 01-16-2000).]
 

Users who are viewing this thread

Top Bottom