Provided by Allen Browne, November 2004. There is a newer version of this page.
If you develop for others, you probably include a form displaying information about your product: version, copyright, contact details, and so on. Typically you display this at start-up, and under Help | About this program.
Consider including things that help trouble-shoot support issues, such as:
This requires some API calls. However, you can just copy the code written by Dev Ashish (Microsoft Access MVP), and paste into a standard module (Modules tab of Database window). Then paste the expressions in the table below into the text boxes on your form.
| Caption | Control Source |
| Access: | =fGetProductVersion(SysCmd(9) & "msaccess.exe") |
| JET: | =fGetProductVersion(fReturnSysDir() & "\msjet40.dll") |
| JET User: | =CurrentUser() |
| Win User: | =fOSUserName() |
| Computer: | =fOSMachineName() |
| Data File: | =Mid([DBEngine].[Workspaces](0).[Databases](0).[TableDefs]("MyAttachedTable").[Connect],11) |
The Office version number is displayed as a number like this:
11.0.6355.0
11.0 means Access 2003. 6355 indicates Service Pack 1 for Office 2003 has been applied. Compare the version number on your development machine.
To display this value, copy the code from this link: Get Version of Office Exes
The Office and JET service packs are in the Downloads section at http://support.microsoft.com.
JET (Joint Engine Technology) is the data engine in Access. It will be a number such as:
4.0.8618.0
Access 2000, 2002, and 2003 all use JET 4. The 8 indicates Service Pack 8. The digits following the 8 are not crucial, and vary
depending whether the JET upgrade was performed as part of a Windows patch.
To display this value, you need the code from the link above and this one: Return temporary, system, and installed directories
This displays the name the user logged into the database with. If no Access security is running, it displays Admin.
This function is built into Access, so no API call is needed.
This displays the name the user logged into Windows with. Copy the code from: Get Login name
This displays the name of the computer, as shown on the network. Copy the code from: Get computer name
This displays the location of the data file the user is attached to. Replace MyAttachedTable with the name of your table. No API calls are needed.
To adapt this approach for Access 97, refer to the JET 3.5 file instead. The file name is msjet35.dll, and it may be in a different location.
| Home | Index of tips | Top |