Incompatibility with Runtime 2016 and older Office versions (1 Viewer)

perlfan

Registered User.
Local time
Today, 07:03
Joined
May 26, 2009
Messages
192
Hi,

I have certain problems with my accde file (compiled with Access 2016) when executed on PCs with older Access full versions installed besides the Access Runtime 2016.
Despite forcing the use of the Runtime with the following link...
Code:
C:\tm\tm.accde /runtime
...Windows tries to open the app with the older Access version which leads to an error message.

Secondly, I pull data into a Word file (which is opened e.g. with Word 2010) from an Access 2016 accdb through an ADO connection. This leads to errors too.

So there are issues that I would like to solve as these issues probably also occur with other older Office versions (2007 etc.).

Thanks for help.
FRANK
 

Minty

AWF VIP
Local time
Today, 15:03
Joined
Jul 26, 2013
Messages
10,371
I suspect if you are manipulating other office apps your are suffering from references not being correct. You need to look at your code and ensure it uses late binding.

I suspect you are using early binding which forces access to load the library that was used to create the database, these library's change with each office / access version.

Have a read http://sourcedaddy.com/ms-access/late-binding.html if you aren't familiar with the differences
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 15:03
Joined
Sep 12, 2006
Messages
15,660
a database will try to use the last version of access

in your startup code you can test the version (it's a string, not a number)

I think these are right

select case application.version:
case "11.0" ;Access 2003
case "12.0" ;Access 2007
case "14.0" ;Access 2010
case "15.0" ;Access 2013
etc


just refuse to open unless you have the right version.
 

isladogs

MVP / VIP
Local time
Today, 15:03
Joined
Jan 14, 2017
Messages
18,247
a database will try to use the last version of access

Not always true
It will use whichever version is currently set in the registry

For example I have both Access 2010 & 2016 on the same PC.
There are good reasons for doing this which I won't go into here ...

I normally use Access 2010 & set this as the default app for accdb files.

There is no problem opening databases in Access 2016 UNLESS they contain version specific VBA references in which case the reference is updated from 14.0 to 16.0.
That's OK in itself but when I next open it in Access 2016 the reference remains at 16.0.

For Access apps I distribute to customers I need to ensure version 14.0 references are used.

If I **** things up by opening in 2016 without thinking, the solution is to do an Office 2010 repair which resets the registry & the references ....
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 15:03
Joined
Sep 12, 2006
Messages
15,660
@ridders
true - and as I now think again - even if you stop a A2003 database working with A2010, by the time you open it, it will be too late, as the references will be updated I think.

FWIW, I don't actually think A2013 and A2016 cause this problem, as my A2003 will reopen normally AFTER I use them with A2013.
 

perlfan

Registered User.
Local time
Today, 07:03
Joined
May 26, 2009
Messages
192
Thank you for your input. I'm trying to implement a late binding ADODB connection in Word but I don't find any decent examples. Can recommend me a useful example/website? Avoiding references (the ActiveX reference in particular) would be great of course.
@ridders: Are you saying that you distribute your files with older references, i.e. you are creating your Office files with Office 2016 but you activate 14 references (e.g. Word 14 Object Library)? In Word 2016 I can only select the Word 16 Object Library however.

Frank
 

isladogs

MVP / VIP
Local time
Today, 15:03
Joined
Jan 14, 2017
Messages
18,247
No.
My clients use a mixture of Access 2010, 2013 & 2016.

I develop and distribute applications in Access 2010 as that is the lowest common denominator used by my clients.

Oh and just to make life difficult, a few clients use 64 bit Office so I have to ensure my code compiles in both 32 & 64 bit Access...
 

perlfan

Registered User.
Local time
Today, 07:03
Joined
May 26, 2009
Messages
192
@ridders - I'm actually a translator and I didn't want to work with Office 2007 anymore so I updated to 2016. Since I distribute my app with Access 2016 Runtime there are often problems with users. The functionality of Access 2007 would have been totally sufficient though.

Do you have Access 2016 and 2010 installed on one machine? I'd like to avoid developing my Access app on another machine... But I guess, going back to an older Access version would resolve many of my problems.

@gemma-the-husky: IMO not starting the app only because Windows doesn't associate the file correctly with Access Runtime 2016 isn't an option because everything is installed correctly. And some people are not capable of opening an accdb with Runtime instead of with an older Access full version.
 

isladogs

MVP / VIP
Local time
Today, 15:03
Joined
Jan 14, 2017
Messages
18,247
Yes I have access 2010 & 2016 32 bit on the same machine.
Its not recommended practice which is why I spelled out reference issues.
I used to have the different versions in virtual machines but found it too much effort switching back and forth

The 64 bit version is on a separate machine
 
Last edited:

perlfan

Registered User.
Local time
Today, 07:03
Joined
May 26, 2009
Messages
192
Yes I have access 2010 & 2016 32 bit on the same machine.

I wanted to try the same - I deinstalled Office 2016, installed only Access 2010 and then reinstalled Office 2016. The accdb opens in Access 2010 but only in read-only mode. Restarting Windows didn't help. Did you have the same issues or can anybody give advice on how to proceed with this?

Thanks, Frank
 

isladogs

MVP / VIP
Local time
Today, 15:03
Joined
Jan 14, 2017
Messages
18,247
I can think of two possible reasons for this behaviour

1. The app was previously opened but not closed completely so you are trying to open another copy of it. Check in task manager for other instances of msaccess.exe

2. The app is being opened in a non trusted location for Access 2010. You need to specify trusted locations for each version separately
 

youyiyang

Registered User.
Local time
Today, 22:03
Joined
Apr 7, 2009
Messages
49
You can associate certain Windows applications/programs to open your files. For example, in my Windows 10 PC, open "Control Panel", then open “Default Program/Application (translated from Chinese version Windows)”, then click the second link "Associate a file type or protocol with a program/application ", then find your .accdb icon to double click it and choose Access 2016 from the open dialogue. The Word problem could be also solved by this method.
I have installed Office 2016 at first and then installed Office 2003 later. The .doc file can only be opened by Word 2003. But it can be opened by Word 2016 at default through above method.
Hope this could be helpful.
 

Users who are viewing this thread

Top Bottom