K
kuslusr1
I am currently using form code I obtained from a Doug Steele link, works very
well. I would like to use the code to locate files in a specific drive and
folder like: F drive, Music folder.
Private Sub cmdFind_Click()
' Open the File Open dialog to find an MP3.
On Error GoTo Err_cmdFind_Click
Dim strFilter As String
Dim strInputFileName As String
' Set the filter to only look for MP3s
strFilter = ahtAddFilterItem(strFilter, "MP3s (*.MP3)", "*.MP3")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an MP3 file...")
If Len(strInputFileName) > 0 Then
If Len(Dir(strInputFileName)) > 0 Then
Me.txtMP3 = strInputFileName
' Call txtMP3_AfterUpdate to ensure that the same actions happen as if they'd
' keyed a file name in.
Call txtMP3_AfterUpdate
End If
End If
End_cmdFind_Click:
Exit Sub
Err_cmdFind_Click:
msgbox Err.description & " (" & Err.Number & ") in " & _
Me.name & ".cmdFind_Click", _
vbOKOnly + vbCritical, "Smart Access Answer Column"
Resume End_cmdFind_Click
End Sub
well. I would like to use the code to locate files in a specific drive and
folder like: F drive, Music folder.
Private Sub cmdFind_Click()
' Open the File Open dialog to find an MP3.
On Error GoTo Err_cmdFind_Click
Dim strFilter As String
Dim strInputFileName As String
' Set the filter to only look for MP3s
strFilter = ahtAddFilterItem(strFilter, "MP3s (*.MP3)", "*.MP3")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an MP3 file...")
If Len(strInputFileName) > 0 Then
If Len(Dir(strInputFileName)) > 0 Then
Me.txtMP3 = strInputFileName
' Call txtMP3_AfterUpdate to ensure that the same actions happen as if they'd
' keyed a file name in.
Call txtMP3_AfterUpdate
End If
End If
End_cmdFind_Click:
Exit Sub
Err_cmdFind_Click:
msgbox Err.description & " (" & Err.Number & ") in " & _
Me.name & ".cmdFind_Click", _
vbOKOnly + vbCritical, "Smart Access Answer Column"
Resume End_cmdFind_Click
End Sub