C
caj
I know this is probably very simple but I just can't figue it out... The
code is below. I need to import different files types (.doc, .pdf. xls) into
a table. The files are all in the same folder. I set up a button and it
access the specified folder and enter the link for each file into a record. I
have researched this and found many variations, but i still need a little
Help. The error get from this is that the expression entered is the wrong
data type for the argument.
Private Sub cmdGetFiles_Click()
Dim strFile As String
Dim strFolder As String
strFolder = "C:\Post\Staging\"
strFile = Dir(strFolder & "\*.*")
Do While Len(strFile) > 0
DoCmd.TransferText acImport, "DocMgr", strFolder & strFile, DocFiles
strFile = Dir$()
Loop
End Sub
Thanks
code is below. I need to import different files types (.doc, .pdf. xls) into
a table. The files are all in the same folder. I set up a button and it
access the specified folder and enter the link for each file into a record. I
have researched this and found many variations, but i still need a little
Help. The error get from this is that the expression entered is the wrong
data type for the argument.
Private Sub cmdGetFiles_Click()
Dim strFile As String
Dim strFolder As String
strFolder = "C:\Post\Staging\"
strFile = Dir(strFolder & "\*.*")
Do While Len(strFile) > 0
DoCmd.TransferText acImport, "DocMgr", strFolder & strFile, DocFiles
strFile = Dir$()
Loop
End Sub
Thanks