lookforsmt
Registered User.
- Local time
- Today, 07:01
- Joined
- Dec 26, 2011
- Messages
- 672
HI all
I am trying to import two text files on daily basis, the files have date in its name,
however the date is not today's date and can be any other dates, for e.g. as below
outwardsort_250620
onussort_250620
Below is the code which is working if the date is current date. How can i amend the code to import the below two files.
outwardsort_ 210520
onussort_210520
Thank you
I am trying to import two text files on daily basis, the files have date in its name,
however the date is not today's date and can be any other dates, for e.g. as below
outwardsort_250620
onussort_250620
Below is the code which is working if the date is current date. How can i amend the code to import the below two files.
outwardsort_ 210520
onussort_210520
Code:
Dim path1 As String, path2 As String, path3 As String, path4 As String
path1 = "D:\Import\Folder\Outward" & Format(Date, "ddmmyy") & ".txt"
path2 = "D:\Import\Folder\Onus" & Format(Date, "ddmmyy") & ".txt"
DoCmd.TransferText acImportDelim, "Outward_Specification", "tbl_Outward", path1, False
DoCmd.TransferText acImportDelim, "Onus_Specification", "tbl_Onus", path2, False
Thank you