I have been using some code to locate a csv file for import into an Access application. (See below)
This code is fine as long as the file names have known names. I need to give the user the ability to choose a file name that can be imported. as i may have multiple files starting with the same numbers/names.
If Me.shipperid = 20000043 Then
strFileName = Dir("c:\scansystem\import\20000043*.csv")
Do Until strFileName = ""
FileCopy "c:\scansystem\import\" & strFileName, "c:\scansystem\import\history\" & strFileName
FileCopy "c:\scansystem\import\" & strFileName, "c:\scansystem\import\BL\portal return file.csv"
strFileName = Dir
DoCmd.OpenQuery "BLappendtoScanManifest", acViewNormal, acReadOnly