Importing contents of a text file into a field

  • Thread starter Thread starter tbjohnson
  • Start date Start date
T

tbjohnson

I have a table of candidate/resume information which
includes the directory/filename of the resume for each
candidate. What I would like to do is write code to go
through the table and open the resume file associated
with each record and write the contents of the resume
file to a memo field. Has anyone done anything like
this? Each resume file is a .txt file.

I already have the process that locates each resume file,
but was not sure on how to open the file and copy the
contents to the particular field.

Thanks!
 
Hello.

Here is some sample code for reading files:

Dim TMP
Dim STR as String
Dim RS as Recordset

While Not RS.EOF
STR = ""
Open RS!NAME For Input As 1

While Not EOF(1)
Line Input #1, TMP
STR = STR & TMP & vbCRLF
Wend

RS.EDIT
RS!RESUME = STR
RS.UPDATE

Close 1
RS.MoveNext
Wend
 
Back
Top