Instance of access
Instance of access
Instance of access
Instance of access
Instance of access
Instance of access Instance of access Instance of access Instance of access Instance of access Instance of access Instance of access Instance of access
Instance of access Instance of access
Instance of access
Go Back  Xtreme Visual Basic Talk > > > Instance of access


Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2004, 01:57 PM
Aderes Aderes is offline
Freshman
 
Join Date: May 2004
Posts: 42
Default Instance of access


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
Reply With Quote
  #2  
Old 08-10-2004, 02:16 PM
okie20 okie20 is offline
Junior Contributor
 
Join Date: Apr 2004
Location: Castle Rock CO
Posts: 214
Default

Quote:
Originally Posted by Aderes
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

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
Reply With Quote
  #3  
Old 08-10-2004, 03:30 PM
Aderes Aderes is offline
Freshman
 
Join Date: May 2004
Posts: 42
Default Blah.....

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
Reply With Quote
  #4  
Old 08-10-2004, 03:48 PM
herilane's Avatar
herilaneInstance of access herilane is offline
Unashamed geek

Retired Moderator
* Expert *
 
Join Date: Jul 2003
Location: London, England
Posts: 8,988
Default

You'll need to add a reference to the Access object library.
Reply With Quote
  #5  
Old 08-16-2004, 07:45 AM
okie20 okie20 is offline
Junior Contributor
 
Join Date: Apr 2004
Location: Castle Rock CO
Posts: 214
Default

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?
Reply With Quote
  #6  
Old 08-16-2004, 08:33 AM
herilane's Avatar
herilaneInstance of access herilane is offline
Unashamed geek

Retired Moderator
* Expert *
 
Join Date: Jul 2003
Location: London, England
Posts: 8,988
Default

Early vs late binding
This is, admittedly, for VB6, but the general principles are still the same in .Net as far as I am aware.
Reply With Quote
  #7  
Old 08-16-2004, 08:34 AM
Aderes Aderes is offline
Freshman
 
Join Date: May 2004
Posts: 42
Default

I just added access as a reference... and boom... it all worked
Quote:
Originally Posted by okie20
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?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Instance of access
Instance of access
Instance of access Instance of access
Instance of access
Instance of access
Instance of access Instance of access Instance of access Instance of access Instance of access Instance of access Instance of access
Instance of access
Instance of access
 
Instance of access
Instance of access
 
-->