asifakhtar
New Member
- Joined
- Oct 13, 2009
- Messages
- 13
- Office Version
- 365
I have installed MS office 2007 and now the below coding is not working its shows me an error (Run time error 2455 )" You entered an expression that has an invalid reference to the property FileSearch "<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> please help me for the below codding that works in MS access 2007 module </o>
<o>' Numbers of text files store in a table </o>
<o></o>Sub AddFile()
Set fs = Application.FileSearch
With fs
.LookIn = "S:\super pass card\Transaction 2010\December"
.FileName = "*.txt"
.Execute
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
DoCmd.TransferText acImportDelim, , "transactions", .FoundFiles(i), True
Next i
End With
End Sub
<o> please help me for the below codding that works in MS access 2007 module </o>
<o>' Numbers of text files store in a table </o>
<o></o>Sub AddFile()
Set fs = Application.FileSearch
With fs
.LookIn = "S:\super pass card\Transaction 2010\December"
.FileName = "*.txt"
.Execute
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
DoCmd.TransferText acImportDelim, , "transactions", .FoundFiles(i), True
Next i
End With
End Sub