Results 1 to 5 of 5
  1. #1
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86

    Making a field based on another field

    Is there a way to make a field based on another field but stop if you reach a number? See example below.



    INTUNT5433 = INTUNT
    INT876 = INT
    EPINTUMB 343 = EPINTUMB

    Thanks for the help

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    14,908
    You only want the alphabetic characters?
    The numeric characters are always at the end of the string?

    A little more detail in the requirement description would be helpful.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    8,284
    make a custom function ,
    usage: getNoNumTxt("INTUNT5433")

    Code:
    
    
    Code:
    Public Function getNoNumTxt(ByVal pvVal)
    Dim vRet
    Dim i As Integer
    For i = 1 To Len(pvVal)
      If IsNumeric(Mid(pvVal, i, 1)) Then
         getNoNumTxt = Left(pvVal, i - 1)
         Exit Function
      End If
    Next
    End Function
    

  4. #4
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86
    Thank you. I will give that a try.

  5. #5
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86
    It worked. Thank you.

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

Similar Threads

  1. Replies: 4
    Last Post: 06-29-2015, 01:56 PM
  2. Replies: 10
    Last Post: 06-18-2015, 11:52 AM
  3. Replies: 3
    Last Post: 08-07-2014, 08:48 AM
  4. Replies: 1
    Last Post: 07-16-2014, 10:05 AM
  5. Replies: 3
    Last Post: 01-15-2012, 02:46 PM

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 - Senior Forums