BMDE
Programmer
- Apr 4, 2006
- 11
Could someone share an example(s) of importing text into Access using Line Input? Its been awhile since I used it.
Thanks in advance.
Thanks in advance.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim rs As DAO.Recordset
'Table to accept input
Set rs = CurrentDb.OpenRecordset("tblTable1")
'File for input
Open CurrentProject.Path & "\imp.txt" For Input As #1
Do While Not EOF(1)
'Get line
Line Input #1, strString
'Add line to table
rs.AddNew
rs!Field1 = strString
rs.Update
Loop
Close #1
rs.Close