Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Update Query On Memo Field (97)

    I have some text stored in a memo field. There is too much for a text field. I want to try and create a title for the record in a text field using the first 20 characters or so of the memo field. Is there a way to have an update query grab the first 20 characters of a memo field? Just to make it a little harder, can it adjust this length so it always grabs a full word. That is, if the memo field was

    Now is the start time for all good men to come to the aid of their country.

    Then the 20th character would be 'm' in time so I would want it to go to the end of time. Any help would be appreciated.

    Ronny
    Ronny Richardson

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Update Query On Memo Field (97)

    The Instr function can be used to find the first space character past 20, and you then use that as the parameter to the Len function. You will need to worry about error conditions such as a memo field that is less than 20 characters and other situations such as no space character past 20 chars, but it shouldn't be too difficult.
    Wendell

Posting Permissions

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