Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009

    Cool Unanswered: Splitting one record to 2 records

    Hi there,

    I have a database that has field "location".

    In the field shows the following for one record:


    Which mean: In location 203 a qty 3 of an item and the same item in location 204 qty 7.

    I want to break that field at the "~" and have two records.

    Item location qty
    box 203 3
    box 204 7

    Can someone help on this.

    Thank you in advance.

    Splitting Hair

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    Hahaahahaaa! 203:4 means in location 203 a quantity of 3?? lol

    Ah, a funny day at dbforums today! Or is it me? ^^

    Anyway, to do that you would need to run some VBA to generate the appropriate records... possibly into a temporary table.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Surrey, UK
    Provided Answers: 18
    It's simple to code a VBA sub to turn this record into many, but it would be better to correct the database design (if that's an option open to you). You ought to move the location information into a separate table, keyed on item and location.
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

Posting Permissions

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