Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Posts
    59

    Arrow Unanswered: Table field updations

    Hello

    I am having a problem relating updation of a field.
    i have a table A which has a column A.1 which is unique but not autonumbered. i take the value
    for this column from another table B . i want to copy particular records from table A into a new table
    C then do the updations on column c.1 and then move back the records from table C to table A .

    This column C.1 is causing me problems. what is want is

    1-update the first record of C.1 with the value of table B
    2-update the table B to the next value
    3-update the second record of C.1 with the updated value of table B
    and so on

    looks like a foor loop to me but i just cant figure it out

    Any help will be very much appreciated
    Thankyou

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Have you looked at MAKE TABLE and UPDATE queries?

    Just for clarity, is this what you want:

    1. Update the first record of C.1 with the value of B.1.
    2. Increment B.1 (add 1 to it's current value).
    3. Update the second record of C.1 with the updated value of B.1.
    etc.

    Seems like quite a strange thing to do. Can I ask why you are doing it? Sounds to me like you're "autonumbering" the records manually or something.
    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
    Feb 2006
    Posts
    59
    thanks for your reply . you have figured it out exactly the way i want . its my requirement thats why i want to do this.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Personally, I'd just make A.1 an AutoNumber and be done with it.

    Why do all this? Why not just modify the data in table A?

    And did you want someone to write this for you? Cause I am very reluctant to help you paint yourself into a corner if there is a much simpler way to go to get the end result you are really after.
    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
    Feb 2006
    Posts
    59
    alrite that point dint came in my mind . let me see what happens

Posting Permissions

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