I have to import a text file that has a suffix in the name that changes every time it runs. Here is an example of the file name with the suffix.
DoCmd.TransferText acImportDelim, "", "PHR_HS_OCC_HLT_BBP_DB-1212845.csv", True, ""
I've tried to put a wildcard into the name so that the most current file with any suffix will be imported.
DoCmd.TransferText acImportDelim, "", "PHR_HS_OCC_HLT_BBP_DB" & "*" & ".csv", True, ""
My problem is that the file can not be found and it appears that the wildcard isn't working.
Any help will be appreciated. Thanks, Kopy
DoCmd.TransferText acImportDelim, "", "PHR_HS_OCC_HLT_BBP_DB-1212845.csv", True, ""
I've tried to put a wildcard into the name so that the most current file with any suffix will be imported.
DoCmd.TransferText acImportDelim, "", "PHR_HS_OCC_HLT_BBP_DB" & "*" & ".csv", True, ""
My problem is that the file can not be found and it appears that the wildcard isn't working.
Any help will be appreciated. Thanks, Kopy