-
I will shortly be starting into a project which requires me to write about 100 boring and complex accounting type reports, which would be so much easier in access than in that awful crystal reports. Is it possible to create access reports based on access queries (the database for the app is in access), and then just call and run them from VB ? Thus meaning that all the hard work is done in the access queries the reports are based on, rather than pages of SQL in VB. ?
-
Dim objAccess As Object
Dim ReportNow As String
ReportNow = "MyReport"
Set objAccess = GetObject(App.Path & "\Data.mdb")
With objAccess.Application
.DoCmd.OpenReport ReportNow, acNormal
End With
objAccess.Quit acExit
Set objAccess = Nothing
This will start access and load up the report 'MyReport'
-