Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    5

    Unanswered: I am new to MS Access and need to find random words in a string

    The example below is in Access 2000
    I have a table that consists of three fields...
    Field 1 is "MATCHED" and has nothingin it... it is null
    Field 2 is "SUBMODEL" and contains various text or may be null
    Field 3 is "NOTE" and contains a text string with various text separated by commas and or semi colons.

    I need to compare "SUBMODEL" to "NOTE" and update "MATCHED" to "MATCHED" when SUBMODEL is found in NOTE. Need to be careful because both CX and CXL are or could be in the note field as well as other similar submodels.

    MATCH|SUBMODEL|NOTE
    |GL|EXCEPT GS, CXL, GL, BASE MODEL;
    |BASE MODEL|EXCEPT GS, CXL, GL, BASE MODEL;
    |CX|EXCEPT GS, CXL, GL, BASE MODEL;
    |CXL|EXCEPT GS, CXL, GL, BASE MODEL;
    |GS|EXCEPT GS, CXL, GL, BASE MODEL;

    Any help would be greatly appreciated
    thanks
    Last edited by Monkey Wrench; 07-20-04 at 17:24.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    UPDATE yourTable
    SET MATCHED = "MATCHED"
    WHERE NOTE LIKE "'*" + SUBMODEL + ",*'"
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jul 2004
    Posts
    5
    Quote Originally Posted by Teddy
    UPDATE yourTable
    SET MATCHED = "MATCHED"
    WHERE NOTE LIKE "'*" + SUBMODEL + ",*'"
    I tried your solution, but i couldn't get it to work...I also tried this

    InStr(1,[test 1]![NOTE],[test 1]![SUBMODEL],1)

    but it didnt work either

  4. #4
    Join Date
    Jun 2002
    Location
    Saudi Arabia / Philippines
    Posts
    126
    MW

    I attach a sample database with one table and one query that works, at least on the data you have supplied. Run the query from the menu bar to actually update the table.
    Attached Files Attached Files
    Rod

    fe_rod@hotmail.com

  5. #5
    Join Date
    Jul 2004
    Posts
    5

    Thumbs up

    Quote Originally Posted by Rod
    MW

    I attach a sample database with one table and one query that works, at least on the data you have supplied. Run the query from the menu bar to actually update the table.

    Thanks Rod...It seemed to have done the job.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •