Results 1 to 4 of 4

Thread: append

  1. #1
    Join Date
    Nov 2004
    Posts
    12

    Unanswered: append

    Hi,

    Is it possible to append the value from a previous records field if it matches a certain criteria?

    ie. after importing a file, there will be records with the first 2 fields empty, the values i need to populate it are on the previous record but located in a different field?Once appended i will delete the previous record.

    So i need to be able to look at the previous record for a certain value and if it matches, copy those values down until it reaches the end.?

    thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    would you not be better doing this in another app like excel before importing to Access,
    Excel can handle these types of problems more easily,
    If it has to be done in access then it will have to be by code unless there is one criteria that also justify these settings,

    If you are happy with code do you work with dao or ado

    Dave

  3. #3
    Join Date
    Nov 2004
    Posts
    12

    append

    Hi
    Ideally it would be handled in excel and then imported into access.
    Ive attached the original file in txt format
    If you look you can see how theres sets of data called A01,A02,A03 that repeat through the file, Where a new instance pops up, that becomes the leading value for any further records that start with a A04.

    Ive also attached the final version that i had to append manually to give an idea how the grouping is removed but the main group values get appended to the start of any records that have a a04 in front.

    Any chance you could have a look and see what you think? I can write some code in modules etc but excel would be easier!
    Im stuck?!
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Right i see the file has been organised what processes do you go through to get it like this, i.e. what do you do manually and then we can start looking at how to get your process together it is always a good idea to undertand whats going on with your file before any code is presented,

    If you try to go through your process in excel of how youd do it manually with the macro recorder on i will be able to clean that code up for you and make adjustments where neccesary,

    It's a good process to go through as then it is easier to see what your trying to achieve,

    post your recorded code in the forum once its there (to be honest i dont have a clue what you are doing but the code will probably explain it better to me)

    Dave

Posting Permissions

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