Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change radio button value 1

Status
Not open for further replies.

jeffmorl

Programmer
Joined
Mar 30, 2011
Messages
33
Location
US
Haven't been able to find the answer to my problem yet. If it's out there, please point me in the right direction.

I have a report parameter form where a user selects a value from a combo box and then a begin date and end date. On clicking a 'submit' button a barcode report is generated and the user uses that report to scan data into another db. If the user enters the same parameters again there is a chance of double entry into the second db. Not good.

I want to prevent users from reprinting the report accidentally, but there may be situations where they may need to (printer jam, lost report, etc.).

My thought was to add a frame with two radio buttons; Yes and No(default). If Yes is selected, a warning comes up to verify that the user wants a reprint. Then the user clicks the 'submit' button and the reprint prints.

All that works.

My problem is that when the user prints the ‘reprint’ report, I want the radio buttons to revert back to their default values; Yes(false) and No(true).

If I try to me.radiobuttonNo.setfocus, I get an error, "can't move the focus to the control radiobuttonNo."

I've tried to refresh the form, requery the frame, and other things. I'm fairly certain that if I close the form and force the user to open it again that would work, but not very user friendly.

How can I make the radiobuttonNo the selected value after the report is printed?

Thanks in advance.
 
OK. I've tried me.radiobutton.value = true isn't working, I get the same error.

What is the best way to change the value back to the default?
 
A single option button in a group will not be bound. I expect you need to set the value of the group/frame to the option value of the button.

Duane
Hook'D on Access
MS Access MVP
 
Here's what I did to fix my situation.

I removed the frame (with 2 radio buttons) and replaced it with a single check box with a default value of False. I'm able to change its value back to False when I need to.

It's not what I wanted to do, but it works just fine for my needs.

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top