Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Blank report from form (Access 2000/SP3)

    Hello All,

    I'm attempting to create a command button that will print a report based on the information given in the form. The report is made from a query and contains only one page of information per record. The code is half from the Access print report wizard and half from a previous post from HansV (Thanks Hans) [img]/forums/images/smilies/wink.gif[/img]

    Private Sub InductPrint_Click()
    On Error GoTo Err_InductPrint_Click

    Dim stDocName As String

    stDocName = "rptInduct"
    DoCmd.OpenReport stDocName, acNormal, , "TicketNumber" = Me.TicketNumber

    Exit_InductPrint_Click:
    Exit Sub

    Err_InductPrint_Click:
    MsgBox Err.Description
    Resume Exit_InductPrint_Click

    End Sub

    Any suggestions would be very appreciated!!

    Thank you,

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Blank report from form (Access 2000/SP3)

    Try changing the line
    DoCmd.OpenReport stDocName, acNormal, , "TicketNumber" = Me.TicketNumber
    to
    DoCmd.OpenReport stDocName, acNormal, , "TicketNumber=" & Me.TicketNumber

  3. #3
    Lounger
    Join Date
    Jan 2005
    Location
    Jacksonville, North Carolina, USA
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Blank report from form (Access 2000/SP3)

    Perfect! Thank you Pat.

    <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>

Posting Permissions

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