Importing contents of a text file into a field

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!
 
I

Ivar Svendsen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top