Hi,
Some function does not work in all Access versions. How can i check which
version of Access, the user has.
We have office- 2000 and -2003.
In Access 2003 i can use Application.version to see it, but when i use the
file in Access -2000 there be compile error.
Does anyone now how I can check version in -2000. (in Excel the Version
function exists).
//Lasse
Allen Browne - 01 Jun 2007 09:15 GMT
Simplest way to get the major version number is:
SysCmd(acSysCmdAccessVer)
If you need to know the service packs as well, see:
http://allenbrowne.com/ser-53code.html#GetAccessVersion
There's a sample app at:
http://allenbrowne.com/ser-53.html
for generating a splash screen that shows lots of version info, including
service packs, version of JET/ACE, the file format, and so on.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Hi,
>
[quoted text clipped - 9 lines]
>
> //Lasse
Baz - 01 Jun 2007 12:12 GMT
> Hi,
>
[quoted text clipped - 9 lines]
>
> //Lasse
If you are using a function that doesn't exist in the Access version that is
running, branching to avoid calling the function will not help, you will get
a compile error before the procedure even runs. You could wrap the
Access/VBA function call in another function, so it doesn't generate a
compile error at runtime because the "wrapper" function doesn't get called,
but this will mean that you will never be able to compile the whole
application.
It's far better to design and test the application for the earliest version
of Access which is likely to be used.