Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 2nd, 2006, 09:14 AM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Print Preview Report from ReportProcess

I am trying to use a list box for reporting (Access2002). I get am getting the list box to populate correctly but can't get the Print or Preview command buttons to do anything.:(
Help!

Private Sub Form_Load()

Dim objAO As AccessObject
Dim objCP As Object
Dim strValues As String

Set objCP = Application.CurrentProject

For Each objAO In objCP.AllReports
    strValues = strValues & objAO.Name & ";"
Next objAO

listReports.RowSourceType = "Value List"
listReports.RowSource = strValues

End Sub
Private Sub ProcessReport(intAction As Integer)

If Not IsNull(listReports) Then
DoCmd.OpenReport listReports, intAction
End If
End Sub
Private Sub butPreview_Click()

ProcessReport acPreview
End Sub
Private Sub butPrint_Click()

ProcessReport acNormal
End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox problem print preview vs. print jenisageek Access 5 May 2nd, 2008 12:54 PM
Print preview scandalous Access 4 February 23rd, 2007 10:45 AM
help in print preview star20010us General .NET 0 September 8th, 2006 07:06 PM
Print Preview problem snanuwa Access 0 August 7th, 2006 09:26 AM
Print and print preview file on the website withou appleLover General .NET 0 February 19th, 2005 02:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.