Results 1 to 4 of 4
  1. #1
    sem1604 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    2

    extracting from middle of string

    I'm attempting to extract a similar string from a linked table the text I'm trying to extract is SPEC #### (this is always 9 characters long including the space), the entry can appear at various positions within the string but is always in the same format.


    Ive tried searching this forum and attempted a few solutions I though might apply and as yet had no success.

    Many Thanks
    Steven
    Click image for larger version. 

Name:	screengrab.png 
Views:	8 
Size:	266.5 KB 
ID:	33900

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,981
    Try this in your query
    Code:
    Mid(Description, InStr(Description,"SPEC"),9)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    sem1604 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    2
    Thanks very much - worked a treat.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,981
    Excellent. Please mark as Solved using the Thread Tools dropdown
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Extracting text from a string
    By Whughes98 in forum Queries
    Replies: 5
    Last Post: 04-17-2017, 11:18 AM
  2. Trim in middle of string
    By tmcrouse in forum Access
    Replies: 2
    Last Post: 12-22-2015, 09:11 AM
  3. Replies: 16
    Last Post: 11-03-2014, 02:38 PM
  4. Parsing Middle of String
    By OprEowyn in forum Queries
    Replies: 4
    Last Post: 02-20-2013, 10:53 PM
  5. how select middle characters on string ???
    By ayman.maher in forum Queries
    Replies: 1
    Last Post: 04-27-2010, 09:29 AM

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