Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Access 2002 change in field size

Discussion in 'Information Technology' started by rlbaer, Jul 28, 2006.

  1. rlbaer

    rlbaer
    Expand Collapse
    Guest

    I have Access 2002 and have a table that I want to downsize the field size
    from 11 (text) to 4 (text). Currently this field is populated with 11
    characters. When I resize, I want to save the last 4 characters and NOT the
    first 4 characters. Can someone assist me?
     
  2. Loading...


  3. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    First Backup your data.

    Use update query to update the field to four chr

    UPDATE TableName SET TableName.FieldName = Right([FieldName],4)


    And then change the field size to 4

    --
    Good Luck
    BS"D


    "rlbaer" wrote:

    > I have Access 2002 and have a table that I want to downsize the field size
    > from 11 (text) to 4 (text). Currently this field is populated with 11
    > characters. When I resize, I want to save the last 4 characters and NOT the
    > first 4 characters. Can someone assist me?
     
  4. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    Create a query using this table.

    Change it to an Update query (Update on query menu.)
    Access adds an Update row to the grid.

    Drag this field into the grid.
    In the Update row, enter:
    Right([xxxx], 4)
    replaceing xxxx with the name of your field.

    Execute the query.

    Verify the data is right.

    You can then open the table in design view, and change the Field Size to 4.

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "rlbaer" <rlbaer@discussions.microsoft.com> wrote in message
    news:571B4362-3F16-4CF3-8126-D48BBD487FD7@microsoft.com...
    >I have Access 2002 and have a table that I want to downsize the field size
    > from 11 (text) to 4 (text). Currently this field is populated with 11
    > characters. When I resize, I want to save the last 4 characters and NOT
    > the
    > first 4 characters. Can someone assist me?
     

Share This Page