How to deselect a chosen option?

JPritch

Registered User.
Local time
Today, 03:53
Joined
Jan 7, 2005
Messages
54
I have a form that opens by showing an option group:

Search by: 1-Team 2-Rep

Based on the option chosen (1 or 2) another set of boxes and options appear that let you select the team or rep and the report you want:


If 1:

Combo: Team A/Team B/Team C
Option Group: 1-Report A, 2-Report B, 3-Report C

If 2:

Combo: JohnDoeRep/JaneDoeRep/SchmoeDoeRep
Option Group: 1-Report D, 2-Report E, 3-Report F

I have specified the logic for which report to run in the OnClick event of the Run Report button based on the conditions above.

My problem occurs when a user for example chooses Option 1 and runs a report, then comes back to the form and wants to run a report under Option 2. When this happens, the report selection for Option 1 stays selected, and as a result, both reports are run when the Run Report button is clicked.

How do I get the Form to deselect any options in the old selection if a user switches from Option 1 to 2 or vice versa?

Many thanks to all who help!
 
I came up with something:

I set the afterupdate event for the first option group (1-Team 2-Rep). Each option has four possible reports that can be run, and they are themselves contained in two separate option groups.

If a user select Option 1- Team, then I set the option group value for Rep's report option group to "5". If a user selects Option 2- Rep, then I set the option group value for Team's report option group to "5". By setting to "5", any report option that was previously selected is now deselected and I'm only getting the report I choose to run.

Is setting a option group value to a non-existent value a safe solution? Any pitfalls? Better solutions?
 

Users who are viewing this thread

Back
Top Bottom