Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2021
    Posts
    1

    Not Like


    I have a owner column with thousands of different names. I want to separate business to individuals. I am trying to create something to exclude these words from the Owner Column. *llc*, *inc*, *health*, *trust*, *holding*, *estate*, *hotel*, *corp*, *music*, *center*, *associ*, *med*, *ltd*, *est*, *invest*, *mortg*, *relations*, *prod*, *org*, *llp*, *savings*, *law*, *finance*, *engineer*, *construc*, *bank*, *marketing*, *disability*, *international*, *communi*, *skin*, *county*. what can I do to exclude these words all on one query.





    Thank you for your help.

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    I would add them to a table with an Exclude field (so you can easily maintain that list), bring that to the query and use InStr([Owner],[Exclude])=0 as the criteria.
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

  4. #4
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Can any Owner records be Null? If so, IIRC Instr will return null so I would not think that = 0 would work for those records. Might need to wrap in Nz function?
    Nz(InStr([Owner],[Exclude]),0)=0
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

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