|Posted by:||noodnutt (noodnu…@gmail.com)|
|Date:||Sun, 9 Feb 2020|
Just wondering if anyone else has seen this issue.
Friday just gone, I was using this same code to import .txt files. Today, I try and the File Open Dialog box is showing zero files in it, even though I can clearly see multiple .txt files in the same folder using the explorer.
Any thoughts please..??
Option Compare Database
Const msoFileDialogFilePicker As Long = 3
Dim myPath As Object
Dim sFile As Variant
Set myPath = Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Title = "Select your File"
.Filters.Add ".txt Files", "*.txt"
If .Show = -1 Then
For Each sFile In .SelectedItems
DoCmd.TransferText acImportDelim, , "tblImports", sFile, -1
sFile = "No File was Selected for Import."