I have a text file (see attached) that I need to convert to a meaningful table in Access 2003. Before I accept the project, I would like to know if it is possible to loop through the imported table and get the data into a format that users can read.
Instead of all data in one column, I need the data to be shown in multiple fields and records.
I am hoping somebody can point me in the right direction.
Thanks a lot
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Converting a text file to Access 2003
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Converting a text file to Access 2003
- This topic has 2 replies, 2 voices, and was last updated 15 years, 5 months ago.
AuthorTopicWSitconc
AskWoody LoungerDecember 15, 2009 at 2:00 pm #464802Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerDecember 15, 2009 at 2:19 pm #1191527Most of the text file has a consistent structure:
– If the first two or three characters on a line aren’t spaces, they indicate a field name.
– Text from position 5 on the line forms the field value, together with the text on subsequent lines that start with spaces.
– A line that only consists of three spaces indicates that the next line starts a new record.
It’s possible to write code to convert this to a table with fields L22, AN, TI, IN etc.But there are lines with a completely different structure, such as
Code:FAN.CNT 1 PATENT NO. KIND DATE APPLICATION NO. DATE --------------- ---- -------- -------------------- -------- PI US 7594994 B1 20090929 US 2005-244589 20051006 PRAI US 2005-244589 20051006 ASSIGNMENT HISTORY FOR US PATENT AVAILABLE IN LSUS DISPLAY FORMAT
How should these be converted?
-
WSitconc
AskWoody LoungerDecember 15, 2009 at 4:18 pm #1191552Most of the text file has a consistent structure:
– If the first two or three characters on a line aren’t spaces, they indicate a field name.
– Text from position 5 on the line forms the field value, together with the text on subsequent lines that start with spaces.
– A line that only consists of three spaces indicates that the next line starts a new record.
It’s possible to write code to convert this to a table with fields L22, AN, TI, IN etc.But there are lines with a completely different structure, such as
Code:FAN.CNT 1 PATENT NO. KIND DATE APPLICATION NO. DATE --------------- ---- -------- -------------------- -------- PI US 7594994 B1 20090929 US 2005-244589 20051006 PRAI US 2005-244589 20051006 ASSIGNMENT HISTORY FOR US PATENT AVAILABLE IN LSUS DISPLAY FORMAT
How should these be converted?
Thanks, Hans
I am not sure where to go from here, but have some ideas after reading your reply. I will play with this and see if I have any more questions.
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
What is wrong with simple approach? (Awaiting moderation)
by
WSSpoke36
20 minutes ago -
Frustrating search behavior with Outlook
by
MrJimPhelps
3 hours, 41 minutes ago -
June 2025 Office non-Security Updates
by
PKCano
6 hours, 54 minutes ago -
Secure Boot Update Fails after KB5058405 Installed
by
SteveIT
2 hours, 16 minutes ago -
Firefox Red Panda Fun Stuff
by
Lars220
6 hours, 50 minutes ago -
How start headers and page numbers on page 3?
by
Davidhs
17 hours, 15 minutes ago -
Attack on LexisNexis Risk Solutions exposes data on 300k +
by
Nibbled To Death By Ducks
11 hours, 50 minutes ago -
Windows 11 Insider Preview build 26200.5622 released to DEV
by
joep517
1 day, 1 hour ago -
Windows 11 Insider Preview build 26120.4230 (24H2) released to BETA
by
joep517
1 day, 1 hour ago -
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
15 hours, 38 minutes ago -
Firefox 139
by
Charlie
8 hours, 13 minutes ago -
Who knows what?
by
Will Fastie
2 hours, 46 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
1 day, 2 hours ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
21 hours, 4 minutes ago -
Misbehaving devices
by
Susan Bradley
1 hour, 48 minutes ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
2 days, 8 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
5 hours, 57 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
2 days, 7 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
1 day, 6 hours ago -
Edge Seems To Be Gaining Weight
by
bbearren
1 day, 21 hours ago -
Rufus is available from the MSFT Store
by
PL1
2 days, 5 hours ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
3 days, 8 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
1 day, 8 hours ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
1 day, 6 hours ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
3 days, 4 hours ago -
Office gets current release
by
Susan Bradley
3 days, 6 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
4 days, 20 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
4 days, 5 hours ago -
Stop the OneDrive defaults
by
CWBillow
4 days, 21 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
5 days, 7 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.