Preview/Print Reports based on Group Option

A

Art

Hi
I have a form which has 3 option groups with one "Print button". The first
Option Group has 3 report types. I want to generate the right report based
on the selection from the Option Group when the print button is triggered.
Any recommendation on how I should approach this. Thanks in advance.

Art
 
B

bhicks11 via AccessMonster.com

I would use VBA code similar to this when they click the print button (put it
in the Event for OnClick):

Dim ReportChosen as string

Select Case

Case me.OptionGroup = 1
DoCmd.OpenReport "ThisReport" , AcViewNormal
Case me.OptionGroup = 2
DoCmd.OpenReport "TheOtherReport", AcViewNormal
Case Else
DoCmd.OpenReport "Thelastreport", AcViewNormal
End Select

And any combination thereof.

Bonnie

http://www.dataplus-svc.com
 
A

Art

Thanks Bonnie for that quick response/help.

I will try this, what if one of the group consist of 3 combo box? Would i
replace ".OptionGroup" to "cboMyFirstComboBox = ?" Thanks again Bonnie.

Art
 
B

bhicks11 via AccessMonster.com

Hi Art,

You need to replace all my naming with your actual control names.

Bonnie
http://www.dataplus-svc.com
Thanks Bonnie for that quick response/help.

I will try this, what if one of the group consist of 3 combo box? Would i
replace ".OptionGroup" to "cboMyFirstComboBox = ?" Thanks again Bonnie.

Art
I would use VBA code similar to this when they click the print button (put it
in the Event for OnClick):
[quoted text clipped - 24 lines]
 

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