Purpose
Returns the name and location of the System.Mdw file, as written in the registry
Parameters
nVersion (Optional) Office version to check
Returns
String with name and location of System.mdw file, or empty string when not found in the registry
Description
This function reads the location of the System.Mdw file from on of the following registry keys:
HKEY_LOCALMACHINE\Software\Microsoft\Office\8.0\Access\Jet\3.5\Engines
HKEY_LOCALMACHINE\Software\Microsoft\Office\9.0\Access\Jet\4.0\Engines
HKEY_LOCALMACHINE\Software\Microsoft\Office\10.0\Access\Jet\4.0\Engines
It searches for the SystemDb entry.
This key is written when you install a copy of Microsoft Office Professional or Access.
If you pass nVersion it will start to check from this Version:
nVersion = 8 Will check all three keys
nVersion = 9 Will check 9.0 and 10.0
nVersion > 9 Will only check 10.0
If you don't pass a parameter, the function will read the Version from the current Engine object and when this version is 3.6 or higher it will default nVersion to 9, else the version will be set to 8.
See Also
Sample