Results 1 to 5 of 5
  1. #1
    Join Date
    May 2004
    Posts
    3

    Unanswered: Extract Data in path

    I have imported the path name of my mp3 collection to a table in Access through VBA. Now that I have the path name of the track what I would like to achieve now is to extract the section of the path that contains the artist name and the song title and put these into seperate Fields and save having to type this information for each path name

    For example the path below:

    C:\My Documents\My Music\1960's -1970's\Abba - Dancing Queen.mp3

    I could extract Abba and move this to the Artist Field and also Dancing Queen and extract this to the song title field.

    Is there anyway I can do this using a query.

    Thanks
    Bluebell

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Possibly, my JET SQL isn't that up to speed.
    However you could accomplish what you want to do using a VBA routine to read through every row in the column
    look for the left most "\" and split at that point
    update the row
    move next until you reach the end of file

    you could do it via a bound form with a command button to invoke the routine

    You might want to put soem error checking to see if the artist was already set to stop overwriting valid artitis, AND / OR check the incoming field ended in ".MP3"

    your misson, should you care to accept it.....
    HTH

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you could also have a look at this thread
    http://www.dbforums.com/t1094375.html

  4. #4
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    So you listen to Disco and admit in as public forum?
    That has to break some sort of normalazation rule.
    Darasen

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    length = Len(Forms!Attachment!AttFileLoc)
    location = InStrRev(Forms!Attachment!AttFileLoc, "\")

    Those are the two key parts to take out of healdem's reference.

    You can use those in an update query as well.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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