If Yes checked, display set of questions

S

SITCFanTN

I saw an access database that had a very cool form. There were 5 Yes/No
options on the form. These were questions that applied to Quality Control.
When a box was checked to indicate yes, additional questions with Yes/No
options displayed below. Those questions that displayed asked questions
about that particular Quality Control Topic question. I'm stuggling to
figure out how that form was so interactive. Did each of the 5 questions
have it's own subform, or was it as basic as "if this box is checked then
display these questions". Any insight is appreciated. Thank you.
 
K

Klatuu

The typical way to do this is to hide the other controls, that is make the
visible property No in design view. Then use the After Update event of the
check box to make the visible again. Like:

With Me
.chkAnotherQuestion.Visible = .chkForMore
End With

You also need to reset it in the Form Current event for new or existing
records

With Me
If .NewRecord Then
.chkAnotherQuestion.Visible = False
Else
.chkAnotherQuestion.Visible = .chkForMore
End If
End With
 
Top