Can you refresh an individual radio button?

G

Guest

I'll start posting here because I'm not sure if this will take a macro or a
VBA module.

I have a form that opens reports based on criteria from the form and the
report depends on which radio option you choose. However, the same report
needs to be opened several times without having to retype the criteria. Is
there a way to refresh the individual radio button so that it loses focus and
can be reselected several times in one sitting (ie, without having to open
and close the form and thus lose the criteria)? If so, is this kind of even
going to OnClick or OnLostFocus or OnMouseUp?

I've tried the refresh command, but since my form is a dialogue, it's not
available.
 
S

Steve Schapel

Erica,

Do you mean you have an Option Group on the form, for some selection? I
don't understand why you can't just select whatever option you want.
Just because there has already been a selection made, doesn't normally
mean you can't re-select. Can you please explain a bit more detail
about what you are having problem with?
 
G

Guest

Steve,

The option group is set up like this: (the "[]" indicates the radio button)

[] ReportName1
[] ReportName2

Based on criteria elsewhere on the form (two sets of criteria, actually), I
need to keep reopening ReportName1. However, since I selected ReportName1
the first time I opened the report, the radio button is filled in and I can't
"unfill" it to reopen the form without reopening the form entirely.

The 1st criteria is text entered in a text box. The second criteria is from
a separate option group. The 1st criteria will always remain the same for a
set of reports, but the second criteria will change, which is why ReportName1
needs to be reopened several times.

I know I could take care of this with a command button, but in reality there
are more than just two report options (there's 25 reports all using the
criteria from the form) and I don't want to crowd my form up with command
buttons. I guess I'm shooting for a more graceful look.

Thanks!
 
S

Steve Schapel

Erica,

It took me a while, I must admit, but I have finally worked out
(guessed) that you must be printing your report from the After Update
event of the reports option group. Am I right? Well, to print from a
Command Button, you could keep the option group for the report
selection, and you would only need one command button to then print
whichever report is selected. That's how I would do it. But if you
want to keep your existing design, all you need to do is add another
action to your macro, after the OpenReport action, like this...
Action: SetValue
Item: [YourReportOptionGroup]
Expression: 0
 
G

Guest

Thanks! I'll try this! Thanks for being patient and helping out!

Erica

Steve Schapel said:
Erica,

It took me a while, I must admit, but I have finally worked out
(guessed) that you must be printing your report from the After Update
event of the reports option group. Am I right? Well, to print from a
Command Button, you could keep the option group for the report
selection, and you would only need one command button to then print
whichever report is selected. That's how I would do it. But if you
want to keep your existing design, all you need to do is add another
action to your macro, after the OpenReport action, like this...
Action: SetValue
Item: [YourReportOptionGroup]
Expression: 0

--
Steve Schapel, Microsoft Access MVP

Steve,

The option group is set up like this: (the "[]" indicates the radio button)

[] ReportName1
[] ReportName2

Based on criteria elsewhere on the form (two sets of criteria, actually), I
need to keep reopening ReportName1. However, since I selected ReportName1
the first time I opened the report, the radio button is filled in and I can't
"unfill" it to reopen the form without reopening the form entirely.

The 1st criteria is text entered in a text box. The second criteria is from
a separate option group. The 1st criteria will always remain the same for a
set of reports, but the second criteria will change, which is why ReportName1
needs to be reopened several times.

I know I could take care of this with a command button, but in reality there
are more than just two report options (there's 25 reports all using the
criteria from the form) and I don't want to crowd my form up with command
buttons. I guess I'm shooting for a more graceful look.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top