PDA

Click to See Complete Forum and Search --> : Print A access report


Jony5
Jul 6th, 2000, 04:10 PM
Anyone knows how do i print access report
Tru VB

I have the report form made all i want to do is by
command button from my VB app to print it !

Gary.Lowe
Jul 7th, 2000, 10:00 AM
Reference the Microsoft Access 8.0 object library
and place the following code in your command button.



Dim X As New Access.Application

X.DoCmd.OpenReport "ReportName", acViewNormal



Hope this helps

Rob Brown
Jul 7th, 2000, 10:02 AM
Ensure you have a reference set to 'Microsoft Access version 8.0'.

Use the following code:

Command1_Click

Dim AccessApp As Access.Application

Set AccessApp = New Access.Application

AccessApp.OpenCurrentDatabase "the path to your database..."

AccessApp.DoCmd.OpenReport "report name"

end sub.

Hope this helps.

Best Regards,

Rob Brown.

Jony5
Jul 7th, 2000, 04:17 PM
10x a lot
It Worked

JoeyCode
Jul 11th, 2000, 04:58 PM
Will this stuff work if Access (or Office) is not installed on the client machine? Will an install routine (VB's own or InstallShield) include the Microsoft Access 8.0 Object Library with the install and allow the code listed here to run okay without a full version of Access?

Thanks,
-JoeyCode