Followup question for:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_23589841.htmlIf you whish to check it out (but you don't have to).
Question:
While both "C\Test1" and "D:\Test1" folders are open and the option group optDataTargetFolders reads 1, how can I change my code so that it will ignore the open file from D Drive (with the exact same caption) and deal only with the one from C drive.
FYI, optDataTargetFolders on a form looks like:
- Target Folder ----------
| o C Drive | <--- optDataTargetFolders = 1
| o D Drive | <--- optDataTargetFolders = 2
--------------------------
----
I have a code like:
Private Sub cmdOpenCloseDraft_Click()
Dim strCaption As String
Dim strFolder As String
Dim strTemp As String
Dim M As Integer
If optDataTargetFolders = 1 Then ' "C drive"
strTemp = "Test1"
strFolder = "C:\Test1"
Else ' "D Drive"
strTemp = "Test1"
strFolder = "D:\Test1"
End If
'v-- I have code to return yes/no for this
If IsTaskRunning(strTemp) Then
'v-- I have code to return yes/no for this
M = EndTask(strTemp)
Else
Shell "explorer.exe " & strFolder, vbNormalFocus
End If
End Sub
I will post IsTaskRunning() and EndTask() shortly.
Thank you.
Start Free Trial