From: Roger on 28 Jul 2010 14:15 On Jul 28, 11:26 am, "Bob Barrows" <reb01...(a)NOyahoo.SPAMcom> wrote: > You are correct that it does not seem possible with early-binding > (attempting to set a reference to a different version of Access in > References raises a "name conflict with existing library" error), but > there seems to be no problem with late-binding. I just tried this in an > A97 module: > > Sub testA2003() > Dim obj As Object > Set obj = CreateObject("Access.Application.10") > Set obj = Nothing > End Sub > > And it does seem to work. An instance of Access did appear in task > manager. When I added "obj.visible=true", I could definitely see an > instance of Access 2003 open when I stepped through the code. > > Douglas J. Steele wrote: > > Actually, it's not really a case of being forward-compatible (you > > can, as far as I know, open Excel 2007 documents from Access 97). > > It's a case that you can't instantiate a different version of Access > > from within Access. You wouldn't be able to instantiate Access 95 > > either (although it wouldn't matter, since you'd be able to open the > > Access 95 database in the instantiated version of Access 97) > > > "ManningFan" <manning...(a)gmail.com> wrote in message > > news:a68ae113-17e4-45b4-8cff-dd1c06560841(a)u26g2000yqu.googlegroups.com... > > > > > > > On Jul 27, 7:33 pm, Roger <lesperan...(a)natpro.com> wrote: > >> currently I have an access97 application that opens a second access97 > >> application using > >> Dim objAccess As Access.Application > >> On Error GoTo fErr > >> Set objAccess = New Access.Application > >> objAccess.OpenCurrentDatabase "path to access97.mdb" > > >> what do I need to change to open an access2003 application ? > > >> is it as simple as > >> Set objAccess = New Access.Application.11 ? > > >> note, both access97 & access2003 are loaded on the computer > > > You need to import your 2k3 tables into an A97 database. No program > > on the planet (that I know of...) is forward-compatible, so there's no > > way A97 could understand what 2k3's structure is. > > -- > HTH, > Bob Barrows- Hide quoted text - > > - Show quoted text - yes, I did try the createObject() earlier today and it works if both versions are on your computer but we're using citrix, and access97 & access2003 are sequenced through softgrid, causing createObject() to fail I guess converting all applications to access2003 is the way to go
From: Douglas J. Steele on 28 Jul 2010 15:51 Makes sense. Thanks, Bob. -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele Co-author: Access 2010 Solutions, published by Wiley (no e-mails, please!) "Bob Barrows" <reb01501(a)NOyahoo.SPAMcom> wrote in message news:i2ppi2$sis$1(a)news.eternal-september.org... > You are correct that it does not seem possible with early-binding > (attempting to set a reference to a different version of Access in > References raises a "name conflict with existing library" error), but > there seems to be no problem with late-binding. I just tried this in an > A97 module: > > Sub testA2003() > Dim obj As Object > Set obj = CreateObject("Access.Application.10") > Set obj = Nothing > End Sub > > And it does seem to work. An instance of Access did appear in task > manager. When I added "obj.visible=true", I could definitely see an > instance of Access 2003 open when I stepped through the code. > > > Douglas J. Steele wrote: >> Actually, it's not really a case of being forward-compatible (you >> can, as far as I know, open Excel 2007 documents from Access 97). >> It's a case that you can't instantiate a different version of Access >> from within Access. You wouldn't be able to instantiate Access 95 >> either (although it wouldn't matter, since you'd be able to open the >> Access 95 database in the instantiated version of Access 97) >> >> >> "ManningFan" <manningfan(a)gmail.com> wrote in message >> > news:a68ae113-17e4-45b4-8cff-dd1c06560841(a)u26g2000yqu.googlegroups.com... >> On Jul 27, 7:33 pm, Roger <lesperan...(a)natpro.com> wrote: >>> currently I have an access97 application that opens a second access97 >>> application using >>> Dim objAccess As Access.Application >>> On Error GoTo fErr >>> Set objAccess = New Access.Application >>> objAccess.OpenCurrentDatabase "path to access97.mdb" >>> >>> what do I need to change to open an access2003 application ? >>> >>> is it as simple as >>> Set objAccess = New Access.Application.11 ? >>> >>> note, both access97 & access2003 are loaded on the computer >> >> You need to import your 2k3 tables into an A97 database. No program >> on the planet (that I know of...) is forward-compatible, so there's no >> way A97 could understand what 2k3's structure is. > > -- > HTH, > Bob Barrows > >
First
|
Prev
|
Pages: 1 2 Prev: Business Analyst,Portland OR Next: DLookup value not visible until clicked |