martin2k

ForumsVB6GamesSoftwareDirectoryHTMLArticlesBlogContact

How to Open Access Reports in Visual Basic 6.0 by hamzajhang


 

Home

Read and add posts to the Visual Basic 6.0 Forums

Download some of my programs and OCXs

Read the Tips here

The old style forum is still available here

Contact


 

Advanced Tip

in the first step.
make an access database and create a report in the database which you wanna run in visual basic 6 program. then put a command button on you form and then write the code to the command button click event. the code is under:

Private Sub Command1_Click ()
    Dim ac As Access. Application
    Set ac = New Access. Application
    Ac.opencurrentdatabase <Database Name with Pathname>
    Ac.visible = true
    Ac.DoCmd.OpenReport <Report Name>, acViewPreview
End Sub

blog comments powered by Disqus
Martin Allen 1999 - 2011.  Last updated Saturday 13 August 2011 12:14:23 AM +0100.