Problem with option group

B

BradC

I am lost on this one. I have an option group on a form to select one of 4
options to print a selected report. The default value of the option group is
set to 0.

the first time you enter the form and select an option button to print a
report you ALWAYS get the report printed from the first option button no
matter waht button you select. Thereafter you can select any option button
and the proper associated report is printed. When you exit the form and
return the same senario is repeated.

is there something else i should declare or initialize?

Help!!!!!
 
N

NoEmailPleasel

I am lost on this one. I have an option group on a form to select one of 4
options to print a selected report. The default value of the option group is
set to 0.

the first time you enter the form and select an option button to print a
report you ALWAYS get the report printed from the first option button no
matter waht button you select. Thereafter you can select any option button
and the proper associated report is printed. When you exit the form and
return the same senario is repeated.

is there something else i should declare or initialize?

Help!!!!!

Would you be able to provide the code you are using for your option
group on the form? It sounds as if you may have incorrect code behind
the form for the option group. Let me work and example.

From my form, the option group, me.frame156, is set to false when the
form opens. The first option button that is clicked is related to
Case 1, and the pattern continues through the 6th option button,
represented by Case Else.

A different report is launched with a different option button click.


Private Sub Frame156_AfterUpdate()

error handling here

Select Case Me.Frame156

Case 1
docmd.openreport "report_1", acViewPreview
Case 2
docmd.openreport "report_2", acViewPreview
Case 3
docmd.openreport "report_3", acViewPreview
Case 4
docmd.openreport "report_4", acViewPreview
Case 5
docmd.openreport "report_5", acViewPreview
Case Else
docmd.openreport "report_6", acViewPreview

End Select

error handling here

End Sub
 
D

Dale Fye

What does your code look like that generates the report?

Is there any code behind the Option Group?
 
B

BradC

This is EXACTLY the solution. I was referring to the individual buttons in
the code rather than the option box. The example you gave is also the easiet
code to read in ANY reply I have ever received! I messed with this over the
entire weekend and your code had me fixed in about 2 hours. Please contact
me: bradcritchfield at msn.com
 

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