By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 2,069 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

how to open reports to view from combo box in form

P: 1
i have a combo box that i will choose from the reports i want to view, how can i do that, knowning that i i have made a button to print those reports form that combo box
Apr 16 '19 #1
Share this Question
Share on Google+
2 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,284
If the Combo Box contains the name of the Report, then it is as simple as:

Expand|Select|Wrap|Line Numbers
  1. Private Sub ComboBoxName_AfterUpdate()
  2.     Call DoCmd.OpenReport(ReportName:= "ReportName", _
  3.                           acView:=acViewPreview)
  4. End Sub
Hope this hepps.
Apr 17 '19 #2

NeoPa
Expert Mod 15k+
P: 31,494
Not sure what you need help on but if you have a Command Button you want to use to trigger the opening of a report then you probably want the code in the _Click event of that Command Button.

The code itself from Twinny should do that for you.

I should also add that it's probably more sensible to trigger the opoening of the report from the updating of the ComboBox, just as Twinny has given code for. Using a Command Button to confirm your selection seems a little clumsy if I'm honest.
Apr 17 '19 #3

Post your reply

Sign in to post your reply or Sign up for a free account.