Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Reports in VB

Status
Not open for further replies.

jasek78

Programmer
Nov 5, 2001
298
0
0
US
Is there a way (via a control, perhaps?) that I can have a program load a MS Access Report to view and print?
 
Hi!

Try this.

Sub ViewReport()
Dim ac As Access.Application
Set ac=New Access.Application
ac.OpenCurrentDatabase (Your Path To The DB)
ac.Visible=True 'preview!! (coment if don't want!)
ac.DoCmd.OpenReport "NameOfYourReport", acViewPrevew 'replace with acViewNormal for printing
'ac.CloseCurrentDatabase 'Uncoment for preview!

Regards!
Ales Zigon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top