"I need to import a text file that is a string list, like this:"
house= SFH occ1FN=Homer occ1LN=Simpson address=123 anywhere st city=springfield st=? zip=? Education=GED
Create a table, call it Table1, with two fields:
TheParameter, text, 50
TheValue, text, 50
This function will read the StringList and separate each line into the left (TheParameter) and right (TheValue) portions.
Sub GetStringList()
Dim db As Database, rst As Recordset
Dim s As String, x As Long
Set db = CurrentDB
Set rst = db.OpenRecordset("Table1")
Open "c:\windows\desktop\StringList.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, s
x = InStr(1, s, "=")
If x > 0 Then
rst.AddNew
rst!TheParameter = Left(s, x - 1)
rst!TheValue = Right(s, Len(s) - x)
rst.Update
End If
Loop
Close #1
rst.Close
Set rst = Nothing
Set db = Nothing
End Sub