Linking Option Buttons to Command Button

  • Thread starter Thread starter Steve G
  • Start date Start date
S

Steve G

Hi,

I am trying to link 4 option buttons to 1 command button.
What I would like to do is select an option and click on
the command button to retrieve a subform that is relevent
to each of the options. My problem is that I have no idea
how to link or code the option buttons to the command
button without it having to bringing all the option's
subforms up, instead just one for each option selected.

The subforms names are: NYCampus, NYCHP, BUCampus, and
BUCHP...all set to visible = NO

The options names are: NYCampusOpt, NYCHPOpt, BUCampusOpt,
and BUCHPOpt. And are numbered 1 - 4 consecutively.

Any help would be great!!! Thank you.
 
Since the options will contain a true/false value depending on if it has
been selected, an easy way would be to set the visibility of each subform to
the value of the option.

Me.NYCampus.Visible = Me.NyCampusOpt

Add the other forms and place the code in the OnCurrent event of the main
form.

Kelvin Lu
 
Back
Top