Results 1 to 3 of 3

Thread: report missing when using docmd.openreport with preview

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    2

    report missing when using docmd.openreport with preview

    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.

  2. #2
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: report missing when using docmd.openreport with preview

    Hi,
    welcome to the forums!!!!

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

    Can you post your code?

    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    2

    Re: report missing when using docmd.openreport with preview

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width