Aderes
08-10-2004, 01:57 PM
Hey guys, I wanna be able to open an instance of access to print off reports. What would be the best way of doin it. I tired using Dim AccessApp As Access.Application, but it doesn’t recognize it. Is there something I have to import?
Thanks
Steve
:huh:
okie20
08-10-2004, 02:16 PM
Hey guys, I wanna be able to open an instance of access to print off reports. What would be the best way of doin it. I tired using Dim AccessApp As Access.Application, but it doesn’t recognize it. Is there something I have to import?
Thanks
Steve
:huh:
I think , and I mean THINK,
Dim AccApp as Object = CreateObject("Access.Application")
It might be MSAcess.Application or something ... then just open your db and print the reports
Aderes
08-10-2004, 03:30 PM
Still having troubles, with Dim acApp As Access.Application... I keep on getting Access.Application is not defined. Any ideas? or if you might know of a good resources to automate access 2000 from within vb.net? I'm just trying to preview a report from Access
Thanks
Steve
:confused:
herilane
08-10-2004, 03:48 PM
You'll need to add a reference to the Access object library.
okie20
08-16-2004, 07:45 AM
So did the Object reference NOT work? or did you try using
dim AccApp as Access.Application
From what I understand, if you declare it as an object and use late-binding, then you do not need the reference ... on the other hand, the Access.Application would have to be referenced. Am I correct?
herilane
08-16-2004, 08:33 AM
Early vs late binding (http://www.xtremevbtalk.com/showthread.php?p=634387#634387)
This is, admittedly, for VB6, but the general principles are still the same in .Net as far as I am aware.
Aderes
08-16-2004, 08:34 AM
I just added access as a reference... and boom... it all worked
So did the Object reference NOT work? or did you try using
dim AccApp as Access.Application
From what I understand, if you declare it as an object and use late-binding, then you do not need the reference ... on the other hand, the Access.Application would have to be referenced. Am I correct?