Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Posts
    4

    Unanswered: update field vba

    Please can you point me in the right diection. I have a table called DATA, field1 is populated from an import. what I want to do is populate field2 with data. the datain field1 starts with a 4500* and all 100* numbers below relate to the 4500* above it. I need to put the 4500* number at the side of the 100* it relates too. here is an example, I have populated field2 to show you what I mean. Thank you.



    Field1 Field2
    4501614187 4501614187
    10 4501614187
    1003499442 4501614187
    1003499528 4501614187
    1003499529 4501614187
    1003499530 4501614187
    1003499531 4501614187
    4501614187
    4501614188 4501614188
    10 4501614188
    1003499443 4501614188
    1003499444 4501614188
    1003499445 4501614188
    1003499446 4501614188
    1003499447 4501614188
    4501614188
    4501614189 4501614189
    10 4501614189
    1003499448 4501614189
    1003499449 4501614189
    1003499450
    1003499451

  2. #2
    Join Date
    Jul 2007
    Posts
    4
    Can anybody help me ????

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    * Points to VBA *

    If only I had the time I would be able to help further. You basically need to write a VBA script to loop through the data, one at a time, remember the 4500 number, keep populating field 2 with it until another 4500 number is found. Rinse and repeat.
    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

  4. #4
    Join Date
    Jul 2007
    Posts
    4
    thanks, I already new that would be the way, so I will start off making a simple loop programme through field1 and when it changes update field2 with result, gonna take me a while this one.

  5. #5
    Join Date
    Jul 2007
    Posts
    4
    Thank you, I have sorted it now, wow what a learning curve that was.

Posting Permissions

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