Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,934
    As explained in post #10 this is the problem with what you are trying to do with your data structured as it is - you need to look at the solution I posted in #12 with regards how you set out your data. Or create a similar looping function to your excel example - but you didn't want to loop.

    The only other thing I can think of is you restructure your city_raw column to have an identifier both before and after each city name - e.g.



    |NCT of Delhi|New Delhi|Delhi|

    then your where statement would become

    WHERE (((InStr([Raw_City],"|" & [city] & "|"))>0));

  2. #17
    SunOffice is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    May 2015
    Posts
    15
    Thanks a ton Ajax!!

    Your trick for arranging string as |NCT of Delhi|New Delhi|Delhi| is working perfectly! Awesome!

    Apart from it, I agree with you to improve the data structure for Raw_city field in table2.

  3. #18
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,934
    glad to help!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 10-29-2014, 03:44 AM
  2. Vlookup from the base table
    By irfanparbatani in forum Queries
    Replies: 28
    Last Post: 08-04-2014, 04:40 PM
  3. Replies: 4
    Last Post: 04-01-2014, 02:11 PM
  4. Replies: 2
    Last Post: 10-09-2012, 03:20 PM
  5. Replies: 2
    Last Post: 12-20-2011, 07:33 AM

Tags for this Thread

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