Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005

    Unanswered: how to shorten text to the first character

    Used Access 97 for years, upgraded and am overwelmed with the changes already.
    Want to take text (i.e. Middle name) and shorten it to just an initial during the import of daily files, or as an SQL statement afterwards.
    Just relearning how to open and use recordsets in 2000 took me hours.
    Can I just do it the same way as in 97, or am I in for another experience?
    Some hints would be appreciated before I begin.



  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    Can't quite remember the pain of converting from 97 to A2000 - its didn't seem that severe.

    As regards using recordsets - there is no reason why you can't continue using the same object model - if you are familiar with DAO then there is no real requirement to shift to ADO (unless you want to). Most of the the techniques you are used to will work in A2000, there are some gotchas but in no way is it a radical departure from previous versions as going into the .NET world.

    The string manipulation functions work the same as before. To use a single letter you can use left$(myColumn,1)
    you have a different problem if you have to strip out the middle name (initial) from a column contianing mulitple names. if you have that problem then you almost certainly have to use a user written function to do the dirty deed. (instr,strcomp & mid$ may be of use to you)

  3. #3
    Join Date
    Oct 2005
    the extracting and replacing worked.
    You were correct in guessing that the full name was part of one field. I cheated by creating another export and reimporting with a " " deliminator.

Posting Permissions

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