• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 79
  • Last Modified:

reports, calling from code.

Can I call a Access report from external code? Like VB.NET?
0
HLRosenberger
Asked:
HLRosenberger
1 Solution
 
MacroShadowCommented:
Something along these lines:
Dim accessApp As Access.Application = CreateObject("Access.Application")
accessApp.OpenCurrentDatabase("path to your access file"", True)
accessApp.visible = True
accessApp.DoCmd.OpenReport("your report name", Access.AcView.acViewPreview)
accessApp.Quit()

Open in new window

0
 
PatHartmanCommented:
You would need to either use OLE automation or create a macro that prints the report and then closes the database.  You could then just shell out to run Access with the macro name as an argument.
0
 
HLRosenbergerAuthor Commented:
thanks.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now