Dim oFSystem As Object
Dim oFolder As Object
Dim oFile As Object
Dim sFolderPath As String
Dim SQL As String
Dim i As Integer
Dim var_FileCN As String
Dim sFile As String
Dim var_FilePattern As String
Set dbs = CurrentDb()
Set obj_RSCN = New ADODB.Recordset
sFolderPath = "D:\Tmp\DATAIN\"
Set oFSystem = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSystem.GetFolder(sFolderPath)
Set obj_RSCN = dbs.OpenRecordset("SELECT File From specificfile", dbOpenDynaset)
MsgBox obj_RSCN!File
For Each oFile In oFolder.Files
If Not obj_RSCN.EOF Then
If obj_RSCN!File > oFile Then
sFile = Mid(oFile, 16, 30)
obj_RSCN.AddNew
obj_RSCN!File = sFile
obj_RSCN.Update
obj_RSCN.MoveNext
Else
If oFile > obj_RSCN!File = True Then
' obj_RSCN.MoveNext
'MsgBox i & " files were imported."
End If
End If
End If
Next
find and match record in VbAhai.., i newbie in vba, i want to try find which one txt file i alread
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote


|