The goal is to import a text file automatically after user has selected a file!
I already have an import spec.
Do I need to open the import dialog box in a different fashion than simply initiating the import text wizard with DoCmd.RunCommand acCmdImport?
Also, how do I pass both the table name and file path to the DoCmd.TransferText command?
The table name needs to be exactly what the text file name is minus the file extension .txt.
The path name is normally the same path, with only the name of the text file changing, but I would like to make it dynamic in the event it does change completely.
I only need text files to be the filter on the dialog box, however.
For example, the text file will be called BK02-05.txt for February 5ths version, and I have been using the import wizard to apply my import spec on this day after day. However, someone is taking over this function, and it would be beneficial to make it easier for them.
I hope I was detailed enough. I am either looking for the code for the complete process or code to pass these parameters to the TransferText command from the acCmdImport command if that's even possible?
The former of the two options would probably be the best! Thanks for any assistance you can provide! If 200 points is not high enough, please advise and I can add more points if need be.
I have scoured the questions already asked, but the code is too advanced for me to apply to my situation specifically or the question has been answered a long time ago and the link is no longer available.