Results 1 to 4 of 4

Thread: Updating Fields

  1. #1
    Join Date
    Jul 2004
    Posts
    56

    Unanswered: Updating Fields

    Hi, can anyone help on this one please.

    I want to update a field in a table with a field from another. However, the field in the first table may already have data in it so I want to add the data along side it ie if the field has in it "00045" and the other table field in it says "00056" I want the field to be updated to "00045,00056". My tables have a short life in this portable database before the data is exported and they are wiped clean so I'm sure there will be a way of comleting this task at the end using an update query, but not quite sure.

    Any help greatly appreciated.

    Thanks

  2. #2
    Join Date
    Jul 2004
    Posts
    125
    Assuming that it's [Field1] you wish to update, use an Update query with the following 'update to' string: [Field1] & "," & [Field2]. The field must be a text field.

  3. #3
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Is this what your looking for here is the test SQL i wrote

    Code:
    UPDATE tblTest SET tblTest.Field1 = IIf([Field1] Is Null,[field2],[field1] & ", " & [field2]);
    my table is called test and my fields are field1 and field 2 change as nescessary

    Dave

  4. #4
    Join Date
    Jul 2004
    Posts
    56

    Thanks

    I knew it was possible - and you knew how.

    Thanks

    col_bol

Posting Permissions

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