Hello, we are in the process of switching over from Windows XP 32-bit to Windows 7 64-bit and the computers that have been upgraded are not using the same path. How can I reference both paths so everyone can access these databases during the transition? This is the path for the Windows 7 computers:
C:\Program Files (x86)\Microsoft Office 12\Office12\MSAccess.exe
This is the code I currently have with the path that we have been using with XP:
[highlight #BABDB6]Private Sub cmdArchivedReports_Click()
On Error GoTo Err_cmdArchivedReports_Click
Dim stAppName As String
If Me.cmbArchivedReports = "2011 Calls" Then
stAppName = "C:\Program Files\Microsoft Office 12\Office12\msaccess.exe ""G:\ PreventionInspection\Archived\ArchivedCallDatabases\Calls2011.mdb"""
ElseIf Me.cmbArchivedReports = "2012 Calls" Then
stAppName = "C:\Program Files\Microsoft Office 12\Office12\msaccess.exe ""G:\ PreventionInspection\Archived\ArchivedCallDatabases\Calls2012.mdb"""
ElseIf Me.cmbArchivedReports = "2013 Calls" Then
stAppName = "C:\Program Files\Microsoft Office 12\Office12\msaccess.exe ""G:\ PreventionInspection\Archived\ArchivedCallDatabases\Calls2013.mdb"""
Else
MsgBox "Please select a Call Database from the list.", vbOKOnly + vbExclamation, _
"Error"
Exit Sub
End If
Call Shell(stAppName, 1)
Exit_cmdArchivedReports_Click:
Exit Sub
Err_cmdArchivedReports_Click:
MsgBox Err.Description
Resume Exit_cmdArchivedReports_Click
End Sub[/highlight]
Thank you
C:\Program Files (x86)\Microsoft Office 12\Office12\MSAccess.exe
This is the code I currently have with the path that we have been using with XP:
[highlight #BABDB6]Private Sub cmdArchivedReports_Click()
On Error GoTo Err_cmdArchivedReports_Click
Dim stAppName As String
If Me.cmbArchivedReports = "2011 Calls" Then
stAppName = "C:\Program Files\Microsoft Office 12\Office12\msaccess.exe ""G:\ PreventionInspection\Archived\ArchivedCallDatabases\Calls2011.mdb"""
ElseIf Me.cmbArchivedReports = "2012 Calls" Then
stAppName = "C:\Program Files\Microsoft Office 12\Office12\msaccess.exe ""G:\ PreventionInspection\Archived\ArchivedCallDatabases\Calls2012.mdb"""
ElseIf Me.cmbArchivedReports = "2013 Calls" Then
stAppName = "C:\Program Files\Microsoft Office 12\Office12\msaccess.exe ""G:\ PreventionInspection\Archived\ArchivedCallDatabases\Calls2013.mdb"""
Else
MsgBox "Please select a Call Database from the list.", vbOKOnly + vbExclamation, _
"Error"
Exit Sub
End If
Call Shell(stAppName, 1)
Exit_cmdArchivedReports_Click:
Exit Sub
Err_cmdArchivedReports_Click:
MsgBox Err.Description
Resume Exit_cmdArchivedReports_Click
End Sub[/highlight]
Thank you