lookforsmt
Registered User.
- Local time
- Today, 09:48
- Joined
- Dec 26, 2011
- Messages
- 672
HI!
I am trying to create a automation. Onclick button will copy the text files to different tables respectively
below is the single text file to be copied to single table. Below is the code
But while doing this I am getting below error
kindly let me know what I am doing wrong. I have searched the forum for solution and not able to find one.
I also want to tell everyone that whatever I have know about access is from this forum and you guys support. Thank you all
I am trying to create a automation. Onclick button will copy the text files to different tables respectively
below is the single text file to be copied to single table. Below is the code
Code:
Private Sub cmdImport_Click()
DoCmd.SetWarnings False
Dim path1 As String
path1 = "E:\Test1\Import\Folder1\Daily download folder\ICCSC01001026" & Format(Date, "yymmdd") & 111900 & ".txt"
DoCmd.TransferText acImportDelim, "26_Specification", "tbl_26_temp", "ICCSC01001026" & Format(Date, "yymmdd") & 111900, path1, False
MsgBox "ICCSC01001026" & Format(Date, "yymmdd") & 111900 & "imported" & " " & DCount("*", "ICCSC01001026" & Format(Date, "yymmdd") & 111900)
DoCmd.SetWarnings True
End Sub
But while doing this I am getting below error
Runtime error 2498
An expression you entered is the wrong data type for one of the arguments
kindly let me know what I am doing wrong. I have searched the forum for solution and not able to find one.
I also want to tell everyone that whatever I have know about access is from this forum and you guys support. Thank you all