Application.Version provides the version of Access being used eg 10 for
Access 2000.
I use some code like:
Set appAccess = CreateObject("Access.Application.8") in Access 97
to open a new instance of Access so that I can create an archive of the
current database. (That took a bit of searching to work it out but it is
working fine in Access 97.....)
I normally work in Access 97 because a) I like it! and b) I am getting too
old to change! and c) I still have customers using it (actually I have a
customer still using Access 2.0 but that is another story..). (I have about
40 clients using the database I am working on and they use Access 97 to XP).
My problem is that when I generated the original code (or pinched it from
somewhere...) I had the code:
Set appAccess = CreateObject("Access.Application.8") which was for Access
97.
When I convert to Access 2000 I don't want to use "Access.Application.8" OR
"Access.Application.10" as appropriate so I changed the code to:
ThisVersion = Application.Version
Set appAccess = CreateObject("Access.Application." & ThisVersion)
This seems to be OK in Access 2000 BUT Access 97 doesn't like the
'Application.Version' ie this wasn't available in Access 97.
Is there some code that I can use that will work in all versions of Access
from 97 onwards that will give me the current version so that i can still
develop in 97 but just convert the database to 2000 and XP??
(I guess that things are somewhat complicated fo r me in that I have Access
2, 97, 2000 and XP all installed (and seemingly working OK, on the one PC!).
Bob