Answered
Typically I have a form with one button. If pressed, the subform is either hidden or visible.
Now my boss wants a form where if radio button A and radio button B are selected, X subform is visible. If radio button A and radio button C are selected, Y subform is visible. How do I write the code for that?
Thanks
Gillian
In the Exit event for radio button B, put a test of whether C is selected, and base the visibility of X on that. In the Exit event for C, put a test of whether B is selected, and base the visibility of Y on that. Something like this ought to work:
// for Radio Button Set B
if(this.rawValue=1) {
if(RadioButtonC.rawValue=0) {
Subform_X.presence = "visible";
}
// There's no "else" condition for either If statement, because you haven't specified what
// needs to happen if both B and C are selected
}
// for Radio Button Set C
if(this.rawValue=1) {
if(RadioButtonB.rawValue=0) {
Subform_Y.presence = "visible";
}
}