Hi Folks
I am using TransferText command in a module to import a number of files and the path is hardcoded, what I want is if the files are not found in the hardcoded path, it should prompt a msg to this effect on a dialogbox from which the user should be able to browse to the folder where the files are and the path-to-files should change to what user browses to.
I am using the following code :
Public Function transfertext()
DoCmd.transfertext acImportDelim, , "table1", "c:\sample\table1.txt", True
DoCmd.transfertext acImportDelim, , "table2", "c:\sample\table2.txt", True
DoCmd.transfertext acImportDelim, , "table3", "c:\sample\table3.txt", True
DoCmd.transfertext acImportDelim, , "table4", "c:\sample\table4.txt", True
DoCmd.transfertext acImportDelim, , "table5", "c:\sample\table5.txt", True
DoCmd.transfertext acImportDelim, , "table6", "c:\sample\table6.txt", True
DoCmd.transfertext acImportDelim, , "table7", "c:\sample\table7.txt", True
End Function
Thanks for your help
Brenda
I am using TransferText command in a module to import a number of files and the path is hardcoded, what I want is if the files are not found in the hardcoded path, it should prompt a msg to this effect on a dialogbox from which the user should be able to browse to the folder where the files are and the path-to-files should change to what user browses to.
I am using the following code :
Public Function transfertext()
DoCmd.transfertext acImportDelim, , "table1", "c:\sample\table1.txt", True
DoCmd.transfertext acImportDelim, , "table2", "c:\sample\table2.txt", True
DoCmd.transfertext acImportDelim, , "table3", "c:\sample\table3.txt", True
DoCmd.transfertext acImportDelim, , "table4", "c:\sample\table4.txt", True
DoCmd.transfertext acImportDelim, , "table5", "c:\sample\table5.txt", True
DoCmd.transfertext acImportDelim, , "table6", "c:\sample\table6.txt", True
DoCmd.transfertext acImportDelim, , "table7", "c:\sample\table7.txt", True
End Function
Thanks for your help
Brenda