beginner access question

S

Steve L

I have a text file I want to import into an Access table. My problem is
that each line of the text file doesn't correspond to a database record.
Essentially, each record of my table will consist of 3 lines of the text
file, read consecutively. i.e., lines 1-3 become the first record, lines
4-6 become the second record, etc. Each line of the text file has 10
entries, so my table will have 30 fields.

Can I do this with a simple import, or do I need to write some code?

Thanks!
 
K

Ken Snell [MVP]

Sounds as if you will need to use VBA code. Are you familiar with the type
of code you'll need to open a recordset (based on your end table) and to
open a text file and read the text file?
 
S

Steve L

No, not at all. I did some light Fortran programming about 25 years ago,
and a little C and Foxpro about 15 years ago, but that's about it.

Can you recommend a good reference book that might get me started?

Thanks for your reply.
 
K

Ken Snell [MVP]

There are a number of good ACCESS books.... John Viescas (ACCESS MVP) has
written many (he has a list of his and others at his website
www.viescas.com).

What you seek to do is not overly difficult...probably would need about 50
lines of code or so. Because you said you're not familiar with VBA, I won't
go into details about the code at this time. But post back if you'd like to
take a stab at it.

--

Ken Snell
<MS ACCESS MVP>
 

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