-
Hi,
I am attempting a project where I can load up an semi-
irregular text file, and import it to an Access 97 DB in
a "regular" way.
'This is an example of a text file entry:
Beacon Point RC Raceway
Don
(205) 333-8679
15717 Beacon Point Drive
Tuskaloosa, Alabama
35406
United States
'And I want it to go into a database where the fields
'are sorted by CompanyName, ContactName, PhoneNumber,
'Etc.
The problem I am having is that all of the text "areas"
aren't uniform. Some don't have a ContactName, some have
e-mail addresses, or web sites that need to be entered,
Some lines have info that isn't needed at all. How do I
tackle this problem? Here is what I have tried:
Read the text file line-by-line and wait for a button to be
pushed to enter it into the appropriate field before
continuing on to the next line. This works pretty well,
and is what I am currently working on, but it seems that
there should be an easier way to do this.
I have also tried writing back to another text file, but
I have had some problems with commas and quotes. I also
tried mass dumping the "sections" of text into a DB records
field by field, but I got an annoying staggering prob,
along with errors related to .edit and .movenext (and osme
others, because I started with an emptyDB?)
Anyhow, my main questions are:
1. Is there an easier way to do what I'm attempting?
2. I am very new to VB, is this type of App too
advanced for me?
3. Last case, is there an existing prog that does this?
I don't want to go this route, but I told a prospective
employer that I could have this ready pretty quick.
I am using VB 5.0, Access 97 (VisData), Win98, and about
100KB of text...
Sorry for the long post, but it seems a complicated problem
to me, and I want to be clear.
PSurge
-
This is quite a nasty problem. What you could do is import all of the text into one long table with free text fields. One record per line. You can then manipulate that table in Access directly.
You could use queries to pick up obvious data (such as telephone numbers). You will need to add a record identifier to each record in the import table to allow the relationships to be maintained.
I think the way that I would do it is to display each line with an associated set of check boxes (tel no., name, address #1, zip code etc.) Let the user review the data and change the values where necessary. To reduce their workload, make some 'intelligent' guesses as to what the values should be.
Is there a marker to separate one address combination from the next in the original file?
If you like, send me the file and I will knock a small form up for you. It will not be the full app, but it might give you something to work on.
Cheers,
P.
PS Just because you are a newbie doesn't mean that you should not attempt something. I wouldn't advise selling your skills to an employer tho' unless you actually have them:)