resetting a selection on an option group

soundsfishy

Registered User.
Local time
Tomorrow, 03:48
Joined
Sep 25, 2002
Messages
174
I have an option Group on my form that has 5 choices. each choice is based on a parameter query . The reports record source the query.

Now, if the user wants to print another report but for a different clientID, user cant press the same option in the option group to be prompted to type in the ClientID. When when user cycle thru the records on the form, the option button stays depressed on that option previously selected. So once a selection has been pressed, users cant press the same option again.

Is there any way after a selection has been made that the option group resets itself. Is this done by resetting the option group value. If so how do I do this?

Ive tried placeing on the on Current Me.grpOption.Value = Null .
This doest appear to work.
 
Last edited:
Mr Fish,

As long as your option group is not bound, your proposed solution should work

Your syntax should read:

Code:
Private Sub Form_Current()
Me.OptionGroupName = Null
End Sub

HTH

Brad.
 
Thanks Brad,

my option group doesnt have a control source if thats you are referring to.

I tried it Oncurrrent and it worked nicely.

Now the tricky bit. lets say you are on a record and you select option 5 and you get prompted by a parameter query to insert the record no that you wish to print. If a user cancels the "enter paremeter value" and then changes there mind and want to press option 5 again, it was cant becuase option 5 is already selected. You have move to another record for the option group to reset. Anyway of handling this?.
 
Last edited:
Don't use parameter values and do it all with a form - that way you can "trap" the cancel and reset the option group.

i.e.

Two small command buttons beside the option group: Print and Clear.

With the Print button you can detect if the option group even has a value and inform the user that they can't print out because they haven't selected an option. You can also check if there are any records to print and inform the user if there is none that way you won't get blank sheets of paper printing off.

And with the clear button you can reset the option group.
 
Sounds like a good idea doing it as you suggested. If I do go using your method, I image that I would need to use case select right?
 

Users who are viewing this thread

Back
Top Bottom