Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2008
    Posts
    4

    Talking Unanswered: Copying column and pasting in the same table using VB

    I have a table in MS Access with column names from F1 to F148. The data in the table has Xs and null value below Row 7 after F4 Column. Row 7 has the option code for these Xs. (Row 3, F4) has the data name “Minus?”. There are Xs in Row 3 after F4 when the option code below gets minus value.

    What I need to do is, I need to have VB coding that looks at the “Minus?” at (Row 3, F4) and it’s Xs and Duplicate those columns and Make all Xs to null and Null to X. also change their option code to minus data (ex: –KA1 for KA1)It’s challenging to me. Please help.
    Attached Files Attached Files
    Last edited by jeyana1; 06-09-08 at 11:54. Reason: Attaching the MS access table

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Are you sure this is an Access table and not an Excel spreadsheet?
    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
    Join Date
    Jun 2008
    Posts
    4
    StarTrekker, I just attached the input excel file as an example data format. Currently, the users are storing this chart in Access and work on their part. This x chart is feeding some other applications from Access as well. The users should be able to copy the minus column and paste in the same table when they import this file. They hate doing it manually in excel because sometimes number of 'minus' columns are too many. There were mistakes costed a lot. This input data format is same all the time.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Ok, so can we see something of your database? Giving a spreadsheet here just makes it confusing. Maybe show a picture of your Access tables? Restate what you want in relation to your Access database?
    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

  5. #5
    Join Date
    Jun 2008
    Posts
    4
    I attached the MS access table replaced my original one. All I need is basically, a VB code to copy columns where the third row at F4 column("minus?") shows Xs and insert them in the same table Tbl_Xchart_AE. Example columns are F8,F9,F15, F18. Then the option code at Row 7 of the new columns changed to -. example: -A45, -AH8 so on. Then reverse Xs to null and null to Xs for the - option code.

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    My first question/comment would be... why did you design a table to mimic a spreadsheet like you have? The "design" of your table doesn't make your task easy at all.

    So... where are you stuck? You can't expect us to code this for you... can you?
    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

Posting Permissions

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