Results 1 to 2 of 2

Thread: Irregular text file to Access 97 database?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Location
    Indianapolis, Indiana
    Posts
    12
    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
    "That which is immobile must suffer destruction"
    -Emanual Lasker

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    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
    Not nearly so tired now...

    Haven't been around much so be gentle...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width