Results 1 to 2 of 2
  1. #1
    Jason is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2018
    Posts
    1

    Query string value between certain commas

    I have a table named "Class_Length_Tbl" with field "PeriodLength". PeriodLength has 5 values that are comma separated. I would like to create 5 queries that each return the value in the respective location in the sting of values. Example below:
    Sample Data:
    Field: PeriodLength
    Value1: 0,Full,0,Half,0
    Value2: Full,Half,Half,0,Full




    Desired outcome:
    Value1 results
    Query 1 would return 0Query 2 would return Full
    Query 3 would return 0
    Query 4 would return Half
    Query 5 would return 0

    Value2 results
    Query 1 would return FullQuery 2 would return Half
    Query 3 would return Half
    Query 4 would return 0
    Query 5 would return Full

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    You need to use the Inst() or Split() function to return the respective result from the string.

    Review https://access-programmers.co.uk/for...d.php?t=201907 for some methods
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Replies: 6
    Last Post: 06-01-2017, 03:25 PM
  2. Replies: 2
    Last Post: 03-23-2017, 08:35 AM
  3. Problem with commas in string array
    By f15e in forum Access
    Replies: 2
    Last Post: 03-02-2017, 12:28 AM
  4. Commas in CSV file
    By cotri in forum Forms
    Replies: 7
    Last Post: 01-28-2010, 03:53 PM
  5. Commas in a Combo
    By DJFayo in forum Forms
    Replies: 0
    Last Post: 10-18-2006, 12:13 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