Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Slight Adjustment needed to Code

Discussion in 'Information Technology' started by Bob, Jul 28, 2006.

  1. Bob

    Bob
    Expand Collapse
    Guest

    I want to be able to view this Report before printing
    How do I adjust this code?

    Private Sub Command27_Click()
    On Error GoTo Err_Command27_Click

    Dim stDocName As String

    stDocName = "rptHoldingNames"
    DoCmd.OpenReport stDocName, acNormal

    Exit_Command27_Click:
    Exit Sub

    Err_Command27_Click:
    MsgBox Err.Description
    Resume Exit_Command27_Click

    End Sub

    Thanks in advance.........Bob Vance
     
  2. Loading...

    Similar Threads Forum Date
    A slightly absurd question Questions and Answers Jun 13, 2014
    Slight Confusion Questions and Answers Dec 30, 2012
    Sikh News Mercury rises slightly in Punjab (New Kerala) Breaking News Jan 4, 2008

  3. Bob

    Bob
    Expand Collapse
    Guest

    Got it thanks, worked it out
    Private Sub Command27_Click()
    DoCmd.OpenReport "rptHoldingNames", acViewPreview, , , , "HoldingNames"
    End Sub

    "Bob" <xxx@xx.xx> wrote in message news:e4lv9i$9i7$1@lust.ihug.co.nz...
    >I want to be able to view this Report before printing
    > How do I adjust this code?
    >
    > Private Sub Command27_Click()
    > On Error GoTo Err_Command27_Click
    >
    > Dim stDocName As String
    >
    > stDocName = "rptHoldingNames"
    > DoCmd.OpenReport stDocName, acNormal
    >
    > Exit_Command27_Click:
    > Exit Sub
    >
    > Err_Command27_Click:
    > MsgBox Err.Description
    > Resume Exit_Command27_Click
    >
    > End Sub
    >
    > Thanks in advance.........Bob Vance
    >
     
  4. xingxing

    xingxing
    Expand Collapse
    Guest

    nihao
    "Bob" <xxx@xx.xx> дÈëÓʼþ news:e4lv9i$9i7$1@lust.ihug.co.nz...
    > I want to be able to view this Report before printing
    > How do I adjust this code?
    >
    > Private Sub Command27_Click()
    > On Error GoTo Err_Command27_Click
    >
    > Dim stDocName As String
    >
    > stDocName = "rptHoldingNames"
    > DoCmd.OpenReport stDocName, acNormal
    >
    > Exit_Command27_Click:
    > Exit Sub
    >
    > Err_Command27_Click:
    > MsgBox Err.Description
    > Resume Exit_Command27_Click
    >
    > End Sub
    >
    > Thanks in advance.........Bob Vance
    >
    >
     

Share This Page