Results 1 to 2 of 2
  1. #1
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2003
    Join Date
    Jun 2016
    Posts
    237

    Adding a (.) after the third charachter in a text field

    Hi all,
    I have a text field in a table with 50000 records.
    I need to update data in one field by adding a dot (.) after the third character if more than three characters exists.


    If the value in the field has only three characters then no need to add the (.).( i.e. so that no (.) ending point exists.)

    Note:
    A leading zero exist in some data fields.

    How can I do this?
    I was thinking of an update query but don't know how to do it.

    Khalil

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Try this Update query:

    UPDATE YourTableName SET YourTableName.YourFieldName = Mid([YourFieldName],1,3) & "." & Right([YourFieldName],Len([YourFieldName])-3)
    WHERE (((Len([YourFieldName]))>="4"));

    You will need to change YourTableName and YourFieldName

    MAKE A BACKUP FIRST, just in case
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Adding specific text in table field record
    By nycman in forum Programming
    Replies: 6
    Last Post: 09-07-2015, 05:52 PM
  2. Replies: 2
    Last Post: 05-07-2015, 04:12 PM
  3. Adding ellipses to a text field
    By cbende2 in forum Access
    Replies: 7
    Last Post: 08-05-2014, 02:31 PM
  4. Replies: 6
    Last Post: 07-03-2012, 12:27 PM
  5. Replies: 2
    Last Post: 03-30-2012, 07:39 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums