I can use the following code to search all files and return the value of the one I selected but do not know how to limit the files initially seen to just files with a txt extension. In effect, I only want to see files with txt extensions when searching for a file. Ideas?
Code:
Private Sub cmdGetTextFile_Click()
Dim f As Object
Set f = Application.FileDialog(3)
f.AllowMultiSelect = True
If f.Show Then
For i = 1 To f.SelectedItems.Count
varTextFileName = (f.SelectedItems(i))
Me.TextfileLocation.Value = varTextFileName
MsgBox "Text Location = " + Me.TextfileLocation.Value
Next
End If
End Sub
Access 2010