This should import everything to fields of text datatype
Private Sub Example()
strFile = "C:\testfile.txt"
fs = CreateObject("Scripting.FileSystemObject").OpenTextFile(strFile, 1).readall
fs = Replace(fs, "/Groups", vbNewLine & "Groups")
For Each itm In Split(fs, vbNewLine & vbNewLine)
tbl = ""
flds = ""
vals = ""
fLines = Split(Trim(itm), vbNewLine)
Select Case UBound(fLines) + 1
Case 9: tbl = "tbl1"
Case 13: tbl = "tbl2"
End Select
If tbl <> "" Then
For Each i In fLines
f = Splitter(i)
If Not IsEmpty(f) Then
If Len(flds) Then
flds = flds & ","
vals = vals & ","
End If
flds = flds & f(0)
vals = vals & f(1)
End If
Next
SQL = "insert into [" & tbl & "] (" & flds & ") values (" & vals & ")"
Debug.Print SQL
CurrentDb.Execute SQL
End If
Next
End Sub
Private Function Splitter(s)
If Trim(s) = "" Then Exit Function
s = Replace(s, "/", "=")
s = Replace(s, "[", "")
s = Replace(s, "]", "")
If InStr(s, "=") Then
a = Split(s, "=")
a(1) = "'" & a(1) & "'"
Splitter = a
End If
End Function