Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ms access version language

Status
Not open for further replies.

deco1josh

Technical User
Jul 14, 2003
3
FR
Can anybody please tell me how I can detect the language of the running version of microsoft access using visual basic. I need this to customise the language of my messages and help file.
 
The information you need is in the Application object. Try the following:

MsgBox "Currently running Microsoft Access, version " & _
Application.Version & ", build " & Application.Build

Good Luck!

 
SBendBuckeye,

I am using MS Access 97 and I have tried your suggestion but I got the following message when tried to compile:

"Method or data member not found"


Any more suggestions please?
 
I use conditional compilation to detect Access 97 or earlier, versus Access 2000:
Code:
    #If Win32 And Vba6 Then
        ...this is Access 2000 (or later?)
    #Else
        ...this is Access 97 or earlier
    #End If
Win32 is documented in Access 97 as a "compiler constant" for conditional compilation. Vba6 is documented for Access 2000, though it's hard to find in the help file. I haven't found anything equivalent for later versions.

Warning: I tried to use just "#If Vba6 Then", but for some reason Access 97 has problems with that unless you test Win32 first. That's why I use the combined test.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
In Access97, use SysCmd as below from help:

MsgBox SysCmd(acSysCmdAccessVer)

The following set of constants provides information about Microsoft Access.

acSysCmdRuntime Returns True (–1) if a run-time version of Microsoft Access is running.

acSysCmdAccessVer Returns the version number of Microsoft Access.

acSysCmdIniFile Returns the name of the .ini file associated with Microsoft Access.

acSysCmdAccessDir Returns the name of the directory where Msaccess.exe is located.

acSysCmdProfile Returns the /profile setting specified by the user when starting Microsoft Access from the command line.

acSysCmdGetWorkgroupFile Returns the path to the workgroup file (System.mdw).

Good Luck! I hate it when they switch stuff around.

 
Deco1josh,

I just reread the last sentence of your original post. Now I realize you're not talking about Access version or VBA version, you're talking about exactly what you said--language. I don't know how we missed it.

For Access 97, globalization is discussed in a file named global.doc, which should have been installed somewhere in your Office program files directory, if you have Office 97 Developer Edition. I only have a partial installation of Office 97, and I do not have access to this document.

I'm sorry, but I wasn't able to figure out where the documentation was for Access 2000. It's probably part of the Office 2000 Multilanguage Pack, which is used to install Office to support several languages in one organization. However, you probably don't have that product.

What you should be able to do is detect the language of the computer you're running on. This is defined by the "Locale ID", which you can get via the Windows API.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top