PDA

Click to See Complete Forum and Search --> : report missing when using docmd.openreport with preview


ShebJonson
Mar 14th, 2006, 09:56 PM
Greetings (newbie here):
I am using MsbBox to determine if screen preview is required for a report. When the conditions are met for print preview, the report does not appear. It works fine for printing directly to printer. Is it hidden behind open forms? I am using forms as a menu system for the users. Print preview works fine if I access the report directly through the objects. Any help out there would be greatly appreciated.

KGComputers
Mar 15th, 2006, 02:58 AM
Hi,
welcome to the forums!!!! :wave:

Are you using ms access? are you using vba? or print reports using vb6.0?

Can you post your code?

:) :) :)

ShebJonson
Mar 15th, 2006, 07:39 AM
I'm using MS Access. Did I post to the wrong place? The code below is the message box info used after determining the required filter string.

Response = MsgBox("Print to screen first?", vbYesNoCancel + vbDefaultButton3, "Print Decision:")
If reponse = vbYes Then
DoCmd.OpenReport "Sick Day Report - Individual", acViewPreview, , FilterStr
ElseIf Response = vbNo Then
DoCmd.OpenReport "Sick Day Report - Individual", acViewNormal, , FilterStr
DoCmd.Close
DoCmd.OpenForm "Menu_Sick_Day_Reports", , , , acFormReadOnly, acDialog
Else
DoCmd.Close
DoCmd.OpenForm "Menu_Sick_Day_Reports", , , , acFormReadOnly, acDialog
End If