VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Preview an Access Database Report

by Angsuman Banerji (23 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 4th January 2008
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Preview an Access Database Report

Rate Preview an Access Database Report



    Dim oAccess As Object 'Access.Application
    
    On Error GoTo ErrFailed
    AccessShowReport = ""
    'Create Access
    Set oAccess = CreateObject("Access.Application")
    'Open Database
    oAccess.OpenCurrentDatabase sAccessDBPath
    'Open report
    oAccess.DoCmd.OpenReport sReportName, 0 'acViewNormal
    'Show Access Report
    oAccess.Visible = True
    oAccess.CloseCurrentDatabase
    Set oAccess = Nothing
    Exit Function

ErrFailed:
    Debug.Print Err.Description
    Debug.Assert False
    AccessShowReport = Err.Description
    If oAccess Is Nothing = False Then
        oAccess.CloseCurrentDatabase
        Set oAccess = Nothing
    End If
End Function


Download this snippet    Add to My Saved Code

Preview an Access Database Report Comments

No comments have been posted about Preview an Access Database Report. Why not be the first to post a comment about Preview an Access Database Report.

Post your comment

Subject:
Message:
0/1000 characters