J
jls
when I run this subroutine, everything freezes. This
started just after I added the arguments for the last Dir
statement. Any suggestions as to why?
Private Sub GoGetChlFiles()
Dim strFileName As String
Const strPath As String = "C:\temp\chl"
Const strTableName As String = "tblMainTable"
strFileName = Dir(strPath & "*.dbf")
Do While strFileName <> "INSERT INTO strTableName([VALUE],
[COUNT],[AREA],[MEAN],[STD])SELECT strFileName.VALUE,
strFileName.COUNT, strFileName.AREA, strFileName.MEAN,
strFileName.STD FROM strFileName"
' run an append query here that uses strPath &
strFileName As the
' location of the file and that appends the data to
your table
strFileName = Dir(strPath, vbNormal)
Loop
End Sub
started just after I added the arguments for the last Dir
statement. Any suggestions as to why?
Private Sub GoGetChlFiles()
Dim strFileName As String
Const strPath As String = "C:\temp\chl"
Const strTableName As String = "tblMainTable"
strFileName = Dir(strPath & "*.dbf")
Do While strFileName <> "INSERT INTO strTableName([VALUE],
[COUNT],[AREA],[MEAN],[STD])SELECT strFileName.VALUE,
strFileName.COUNT, strFileName.AREA, strFileName.MEAN,
strFileName.STD FROM strFileName"
' run an append query here that uses strPath &
strFileName As the
' location of the file and that appends the data to
your table
strFileName = Dir(strPath, vbNormal)
Loop
End Sub