I am using a little VB6 program that compares the versions between a local Access 2000 database and one on the server. If the server version is greater this file is copied locally and then MSAccess is launched. The problem that I am having is that I now need this to work on Windows XP but the path to MSaccess.exe is different to Win2000 so the shell command is failing.
In the short term I have fixed the problem by adding an 'If...Then' clause but I was wondering if there is some generic code that I can use in VB to locate the full path for MSAccess.exe so that I can shell to it from any OS.
In Access VBA I could have used SysCmd(acSysCmdAccessDir) so I'm hoping for a VB6 equivalent to this.
You might use the Access library by referencing the "Microsoft Access 9.0 Library" which should be visible if Office 2000 has been installed on the PC where you run VB6 on. On my PC it is 10.0 because I use Office XP.
You could then use a piece of code like this:
Dim appAccess As Access.Application
Set appAccess = New Access.Application
appAccess.Visible = True