craigachan
Registered User.
- Local time
- Today, 07:34
- Joined
- Nov 9, 2007
- Messages
- 285
I'm wondering if someone can give me insight to a problem that I have. I have 3 db called AOMSChart.accdb, AOMSSurgery.accdb and AOMSLetters.accdb. I've run the following code from AOMSChart.accdb on Win XP and Win Vista systems without problems in both full Access 2007 and Runtime versions.
I will use the above code to launch various other Access DBs such as:
The above code works fine on all windows systems including Win 7. However the following code works in Ac2007 but not in runtime on any of my Win 7 workstations. I can launch the AOMSLetters.accdb from Explore and from the cmd, but not form this code.
I'm baffled and would appreciate any input to my problem. Both the FE dbs are keep in the mydocuments folder on the workstations. I'm not even sure its even related to Win7 at all. When I click the cmdLtr button nothing happens and no errors.
Code:
Public Function Launch(FN As String, PTFile As String)
' FN = File Name
' PTFILE = Path to File
On error goto Err_Launch
Launch = ShellExecute(0, "open", FN, "", PTFile, 1)
LaunchExit:
Exit Function
Err_Launch:
Msgbox Err.Number & ": " & Err.Description
Resume LaunchExit
End Function
I will use the above code to launch various other Access DBs such as:
Code:
Private Sub cmdSurg_Click()
'this launches AOMSSurgery.accdb
'FN = File Name
' PTFILE = Path to File
Dim FN As String
Dim PTFile As String
FN = DLookup("AOMSSurgery", "CHANLinkPaths") '
PTFile = ""
Call Launch(FN, PTFile) 'Public
End Sub
The above code works fine on all windows systems including Win 7. However the following code works in Ac2007 but not in runtime on any of my Win 7 workstations. I can launch the AOMSLetters.accdb from Explore and from the cmd, but not form this code.
Code:
Private Sub cmdLtr_Click()
'this launches AOMSLetters.accdb
'FN = File Name
' PTFILE = Path to File
Dim FN As String
Dim PTFile As String
FN = DLookup("AOMSLtr", "CHANLinkPaths")
PTFile = ""
Call Launch(FN, PTFile) 'Public
End Sub
I'm baffled and would appreciate any input to my problem. Both the FE dbs are keep in the mydocuments folder on the workstations. I'm not even sure its even related to Win7 at all. When I click the cmdLtr button nothing happens and no errors.