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.
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.