Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / August 2005

Tip: Looking for answers? Try searching our database.

beginner access question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve L - 31 Aug 2005 00:21 GMT
 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!
Ken Snell [MVP] - 31 Aug 2005 00:48 GMT
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?

Signature

       Ken Snell
<MS ACCESS MVP>

>  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.
[quoted text clipped - 6 lines]
>
> Thanks!
Steve L - 31 Aug 2005 03:09 GMT
 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.

> 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?
Ken Snell [MVP] - 31 Aug 2005 14:12 GMT
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.

Signature

       Ken Snell
<MS ACCESS MVP>

>  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.
[quoted text clipped - 6 lines]
>> 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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.