Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / August 2005

Tip: Looking for answers? Try searching our database.

Print page 1 of a report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Céline Brien - 03 Aug 2005 20:03 GMT
Hi,
By clicking on a button in a form, I preview a report.
I would like to obtain the printing of the first page of the report.
The codes to preview are below.
Many thanks,
Céline
Using Access 97
------------------------------------------------

Private Sub ImprimerEPlaintes_Click()
On Error GoTo Err_ImprimerEPlaintes_Click

   Dim stDocName As String
   Dim stLinkCriteria As String

   stDocName = "EPlaintes"
   stLinkCriteria = "[NoMembre]=" & Me![NoMembre]
   DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria

Exit_ImprimerEPlaintes_Click:
   Exit Sub

Err_ImprimerEPlaintes_Click:
   MsgBox Err.Description
   Resume Exit_ImprimerEPlaintes_Click

End Sub
fredg - 03 Aug 2005 20:46 GMT
> Hi,
> By clicking on a button in a form, I preview a report.
[quoted text clipped - 23 lines]
>
> End Sub

Look up the PrintOut method in VBA help.

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "EPlaintes"
    stLinkCriteria = "[NoMembre]=" & Me![NoMembre]
    DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
    DoCmd.PrintOut acPages, 1, 1   
etc.

Signature

Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Céline Brien - 04 Aug 2005 12:55 GMT
Hi Fred,
It works !
Thank you.
PrintOut method. It is noted.
Have a good day.
Céline

> > Hi,
> > By clicking on a button in a form, I preview a report.
[quoted text clipped - 34 lines]
>      DoCmd.PrintOut acPages, 1, 1
> etc.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.