D B Lawson
01-16-2000, 02:31 PM
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.
For example: Info to be sent "yes", enter details of info sent.
|
View Full Version : If Then Else? D B Lawson 01-16-2000, 02:31 PM 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 01-16-2000, 06:11 PM 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).] |