A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Preview/Print Reports based on Group Option



 
 
Thread Tools Display Modes
  #1  
Old June 27th, 2008, 12:22 AM posted to microsoft.public.access.reports
ART
external usenet poster
 
Posts: 432
Default Preview/Print Reports based on Group Option

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

  #2  
Old June 27th, 2008, 01:03 AM posted to microsoft.public.access.reports
bhicks11 via AccessMonster.com
external usenet poster
 
Posts: 529
Default Preview/Print Reports based on Group Option

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


Art wrote:
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


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200806/1

  #3  
Old June 27th, 2008, 01:42 AM posted to microsoft.public.access.reports
ART
external usenet poster
 
Posts: 432
Default Preview/Print Reports based on Group Option

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


"bhicks11 via AccessMonster.com" wrote:

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


Art wrote:
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


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200806/1


  #4  
Old June 27th, 2008, 02:27 AM posted to microsoft.public.access.reports
bhicks11 via AccessMonster.com
external usenet poster
 
Posts: 529
Default Preview/Print Reports based on Group Option

Hi Art,

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

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

Art wrote:
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]

Art


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200806/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.