I have users with mix OS needs to access the database resides on the server and can’t be divided in 2 or have 2 separate databases. The VB within the db, has code reference to the MS Office see below, I can only use one.
I’m looking for a way to incorporate both path in the script or an alternative method to enable both users access the db from multi OS Win-XP and Win-7.
I can do it with a batch file using the following script, but I prefer doing it within the DB.
If exist C:\"Program Files (x86)" GOTO 64BIT
if not exist C:\"Program Files (x86)" GOTO 32BIT
Thank you
Database
path= \\server-670\DATABASE\tsa.accdb
Clients
Windows XP 32bit OS with MS Access 2010 /32bit,
path= C:\Program Files\Microsoft Office\office14\MSACCESS.EXE
Windows 7 64bit OS with MS Access 2010 /32bit,
path= C:\Program Files (x86)\Microsoft Office\office14\MSACCESS.EXE
VB script
Private Sub Command71_Click()
Dim stAppName As String
stAppName = "" & DLookup("[Link]", "Admin_Links", "[No] = 4") & ""
If DLookup("[Type]", "Admin_Links", "[No] = 4") = "Database" Then
Call Shell(stAppName, 1)
Else
Application.FollowHyperlink stAppName, , True
End If
‘stAppName = "C:\Program Files (x86)\Microsoft Office\office14\MSACCESS.EXE\ \\server-670\DATABASE\tsa.accdb /wrkgrp \\server-670\DATABASE\tsa.mdw"
‘stAppName = "C:\Program Files\Microsoft Office\office14\MSACCESS.EXE\ \\server-670\DATABASE\tsa.accdb /wrkgrp \\server-670\DATABASE\tsa.mdw"
End Sub