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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why won't report Preview

Status
Not open for further replies.

linuxjr

Programmer
Jun 2, 2001
135
US
I know I'm probably in the wrong board but I'm trying to do a print Preview in Visual Basic 6 of an access report. I am just curious how to do it. I got it to Print the report slick as a whistle but preview it nope. It runs but nothing no window no nothing to appear Heres the code:

Private Sub cmdPrintReport_Click()
'Testing to see if this will print a report in Visual
'Basic from Access 2000

Dim MyAccess As Access.Application
Set MyAccess = CreateObject("Access.Application")
MyAccess.OpenCurrentDatabase "C:\My Documents\NursesLicenses.mdb"
MyAccess.DoCmd.OpenReport "qryFirstShift", acviewPreview

End Sub

I just wanted to figure out why it won't preview. Say you get a blank report for a month/day and no need to waste a sheet of paper. Thanks for your time and have a nice day.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top