Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preview Reports while on "Reports" Tab 2

Status
Not open for further replies.
Mar 2, 2005
171
US
One of my tabs on a multi-tabbed form is titled "Reports."

What I would like to do is for the end-user to see all of the Reports within the database populate the ListBox and then upon clicking on the command button to the right, the specific Report is previewed.

Upon clicking on the other command button titled "Print," the previewed Report is printed.

Completed the design, but not able to get the list of Reports to display in the list box!

Any suggestions?

Thanks in advance.
 
What about the following RowSource ?
SELECT Name FROM MsysObjects WHERE Type=-32764 ORDER BY 1

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

That did it!

Now, the name of the sample Report that I created is displayed. However, upon clicking on the sample Report, an error is displayed "The action or method requires a Report Name argument."

Trying to debug the following code (The line beginning with "DoCmd" is highlighted) -

Private Sub ProcessReport(intAction As Integer)

If Not IsNull(lstReports) Then
DoCmd.OpenReport lstReports, intAction
End If

End Sub


 
LevelThought,

Try this:
Code:
If Not IsNull(lstReports) Then
    DoCmd.OpenReport [red][b]Me![/b][/red]lstReports, intAction
End If
HTH,

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top