• Update within table (Access2003)

    • This topic has 5 replies, 2 voices, and was last updated 17 years ago.
    Author
    Topic
    #451406

    Is this possible to update field in one table (where values are blank) to the another field in the same table?

    Region_____GeoRegion
    East
    West________WEST
    Central

    Update GeoRegion to Region where values are blank.

    Region_____GeoRegion
    East________East
    West________WEST
    Central_____Central

    Viewing 1 reply thread
    Author
    Replies
    • #1111221

      Create a query based on the table.
      Select Query | Update query.
      Add the Region and GeoRegion fields to the query grid.
      Enter the following in the Criteria line for the GeoRegion field: Is Null
      Enter the following in the Update to line for the GeoRegion field:

      [NameOfTable].[Region]

      where NameOfTable is the name of the table.
      Select Query | Run or click the Run button on the toolbar.

    • #1111225

      WOW!
      My mistake was I was using
      Where IsNull([NameOfTable].[Region])

      Thanks so much!

      • #1111228

        All great! Except now my all values are different case.
        Some all UPPER, some Normal with capital first letter.

        Is there way to make them all Normal? Thanks

        • #1111231

          The query will copy whatever is in the Region field. If you want it to use “proper” case, set the Update to line to

          StrConv([Region],3)

          This will only affect the values that are actually updated. It won’t change the values in the GeoRegion field that have already been filled in. If you want to change those too, create another update query, and add only the GeoRegion field, with:

          Criteria: Is Not Null
          Update to: StrConv([GeoRegion],3)

    Viewing 1 reply thread
    Reply To: Update within table (Access2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: