Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    recognize a variable (access 2003)

    I want to use variables to name an exported report to a snapshot file but I do not know how to get access to recognize the variable. When I step through the following sub and hover over strAO = Reports!rpt_NEW_REVIEW_FORM.AO, strAO = the name of the AO, but in the file name it does not. My result is strAO.snp.

    Private Sub Combo1_AfterUpdate()
    OpenReports ("rpt_NEW_REVIEW_FORM")
    Dim strAO As String
    Dim strAsset As String
    strAO = Reports!rpt_NEW_REVIEW_FORM.AO
    strAsset = Reports!rpt_NEW_REVIEW_FORM.ASSET_NUMBER
    Me.Visible = False
    DoCmd.OutputTo acOutputReport, "rpt_NEW_REVIEW_FORM", acFormatSNP, _
    "Cocuments and SettingsAdminDesktopstrAO.snp"
    End Sub
    Thanks
    chuck

  2. #2
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: recognize a variable (access 2003)

    Got it guys!

    Private Sub Combo1_AfterUpdate()
    Me.Visible = False
    OpenReports ("rpt_NEW_REVIEW_FORM")
    Dim strAO As String
    Dim strAsset As String
    strAO = Reports!rpt_NEW_REVIEW_FORM.AO
    strAsset = Reports!rpt_NEW_REVIEW_FORM.ASSET_NUMBER
    DoCmd.OutputTo acOutputReport, "rpt_NEW_REVIEW_FORM", acFormatSNP, _
    "Cocuments and SettingsAdminDesktop" _
    & strAsset & " " & strAO & " " & "Review Form.snp"
    End Sub
    Thanks
    chuck

Posting Permissions

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