Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Location
    United Kingdom
    Posts
    56

    Unanswered: Getting Initial letters from text strings

    Hey Guys,

    Bit of a problem with the following and not sure how to even start...

    I have a form called "frmPatients" whose source is the table "tblPatients" with two fields called "Forename" and "Surname".

    I also have a field called "Initials".

    How can I populate the "Initials" field with the first letter of the text in "Forename" and then the first letter in the field "Surname"?

    I'm not even sure if this should take place in the form level or in a query...

    Any help would be greatly appreciated,

    Rusty

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    this query does it.
    Code:
     
    UPDATE YourTableName SET Initials = UCase(Left(Trim([forename]),1)+"."+Left(Trim([surname]),1)+".");
    ghozy.

Posting Permissions

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