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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|