Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Unhappy Unanswered: printing reports

    i would like to print a report after clicking a button, but i don't first want to view the report. it must just print immediately.
    what is the code to print a report?

    thanks again in advance
    actionant

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Code behind button

    Dim stDocName As String

    stDocName = "yourreportname"
    DoCmd.OpenReport stDocName, acViewNormal
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Re: Code behind button

    Originally posted by garethdart
    Dim stDocName As String

    stDocName = "yourreportname"
    DoCmd.OpenReport stDocName, acViewNormal
    doesn't this open the report?
    i don't want to open the report.
    i just want to print it.

  4. #4
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Unhappy No

    It does what you asked for my friend..

    http://msdn.microsoft.com/library/de...OpenReport.asp

    There is a good reference - Microsoft MSDN - Worth a look
    Last edited by garethdart; 01-27-04 at 10:35.
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  5. #5
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Talking Re: No

    Originally posted by garethdart
    It does what you asked for my friend..

    http://msdn.microsoft.com/library/de...OpenReport.asp

    There is a good reference - Microsoft MSDN - Worth a look
    sorry about that
    thanks a bunch

  6. #6
    Join Date
    Dec 2003
    Posts
    36
    you can also use the wizard while placing your button on a form , and then choose report operations --> print

    no code needen

    greetz
    ... man man man ...

Posting Permissions

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