I am trying to create this module or form that imports a specific text file in multiple folders into a table in access 2002. I want to use a date range say from 2/1/10 to 3/3/10 but I cant figure out how to make it skip the missing weekend folders. Below is what I have so far which is only using a single date. The date is also formatted in yymmdd.
Code:
Private Sub cmdConvert17_Click()
Dim strDate As String
Dim SourceFile
DoCmd.SetWarnings False
strDate = txtDate
' ERS Equip Delete
DoCmd.OpenQuery "ERS Equip Delete", acViewNormal, acEdit
' SourceFile
SourceFile = "G:\SHARED\CSGRJE\" & strDate & "\ERS_EQUIP.TXT"
' Transfer ERS_EQUIP
DoCmd.TransferText acImportFixed, "ERS_EQUIP Import Specification", "ERS_EQUIP", SourceFile, False, ""
' ERS Equip Archive Append
DoCmd.OpenQuery "ERS Equip Archive Append", acViewNormal, acEdit
DoCmd.SetWarnings True
End Sub