|
-
Jul 6th, 2000, 04:10 PM
#1
Thread Starter
Junior Member
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 !
KraMba

-
Jul 7th, 2000, 10:00 AM
#2
Fanatic Member
Reference the Microsoft Access 8.0 object library
and place the following code in your command button.
Code:
Dim X As New Access.Application
X.DoCmd.OpenReport "ReportName", acViewNormal
Hope this helps
Gary Lowe 
VB6 (Enterprise) SP5
ADO 2.6
SQL Server 7 SP3
OK I know my spelling and grammer is crap so don't quote me on it!
To err is human to take the P! is only natural !!
Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip

-
Jul 7th, 2000, 10:02 AM
#3
Lively Member
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.
-
Jul 7th, 2000, 04:17 PM
#4
Thread Starter
Junior Member
KraMba

-
Jul 11th, 2000, 04:58 PM
#5
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|