Results 1 to 3 of 3
  1. #1
    Trish is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2013
    Posts
    1

    Question Sorting Text Field by Sections divided by a dash

    Can you sort text fields where sections are divided by a dash (-)



    RESTRICT TO GATE -DEFECT - UAT Restrict to gate : User able to restrict a flight prior to 30 min and 45 min departure time

    Write query to pull by DEFECT in the text above??

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Can you sort text fields where sections are divided by a dash (-)
    I think you can. The problem I see is when you try to sort a Text field with more than 1 word it would take a very long time.
    I think Access will only sort by the first word.

    RESTRICT TO GATE -DEFECT - UAT Restrict to gate : User able to restrict a flight prior to 30 min and 45 min departure time
    I am confused here. Is this an example of what you want to sort?

    Write query to pull by DEFECT in the text above??
    I think this is doable.

    in the query enter ="Defect"

    Dale

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I suspect what you want is to sort on whatever is after the dash. If so, check out the Mid() and InStr() functions.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Running Sum divided by Month Total
    By kwooten in forum Reports
    Replies: 7
    Last Post: 05-16-2013, 10:20 AM
  2. How to eliminate the text after and before the dash
    By Jerseynjphillypa in forum Queries
    Replies: 1
    Last Post: 06-15-2012, 10:58 AM
  3. Total divided by weekdays in a month
    By normie in forum Access
    Replies: 1
    Last Post: 03-22-2012, 07:09 PM
  4. 0 divided by 0 = impossible..
    By LanieB in forum Queries
    Replies: 13
    Last Post: 01-03-2012, 05:24 PM
  5. Replies: 1
    Last Post: 02-01-2010, 06:12 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