Results 1 to 14 of 14
  1. #1
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Soundex() linking


    Can we link the main form and subform on the basis of the SOUNDEX() FUNCTION ?

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    not sure what you mean, soundex is a way of comparing words that sound the same (e.g. 'might' and 'mite'), Can you explain what you are trying to acheive

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    If your talking about Master\Child links I suppose you could as long as each recordsource contains the soundex value.
    Note however that soundex (at least the one I use) is not all that accurate by itself. For instance "Might" and "Mite" actually return different values.
    I do a name search where I actually test for an exact match, a levenschtein distance match, and a soundex match which together return a fairly accurate result.

    As Ajax notes, it would really be helpful to know what it is you wish to achieve.

  4. #4
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by Ajax View Post
    not sure what you mean, soundex is a way of comparing words that sound the same (e.g. 'might' and 'mite'), Can you explain what you are trying to acheive


    In case there is a spelling mistake in typing in the field that links the main form and subform, then I should also be able to view the misspelled entry.

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    still doesn't make sense - just choose the form from the drop down menu

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    kundan,
    You're focused on soundex as a linking field between form and subform. Can you step back and tell us about your application in simple terms?You have not provided sufficient information to get a meaningful answer, in my view.

  7. #7
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    OK - think I understand - you have a main form with a record which has a field which is the calculated soundex value. And you have a subform with a fieldwith a soundex value and you want to populate the subform based on these values.

    If so, the answer is yes - basically soundex produces a string value - but because these are not in a relationship, the properties will not populate automatically, you will need to do that yourself - in the subform control properties (not the subform itself) enter the name of the field on the main form in the link master property and the name of the field in the subform in the link child property. Note the fields need to be generated in the query uses in each recordsource, not as a calculated control
    Last edited by CJ_London; 02-25-2019 at 06:13 PM. Reason: clarification

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    In case there is a spelling mistake in typing in the field that links the main form and subform, then I should also be able to view the misspelled entry.
    Here's another take on that - "if I type in the field that links the main form to the subform but I misspell a word in that field, I want to ctach it"
    Probably wrong though.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by Micron View Post
    Here's another take on that - "if I type in the field that links the main form to the subform but I misspell a word in that field, I want to ctach it"
    Probably wrong though.

    For example, the name "Sahu" can also be typed as "Sahoo". Now, when I type "Sahu" in the linked field of the main form then I want the subform to show all "Sahu" and all "Sahoo" too. How to achieve this?

  10. #10
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Gotcha. From what little I know of the concept, you'd have to run the function on both the child and parent linked fields and test for a numerical match.

  11. #11
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    further to my answer in post #7. The other way to do it would be to repopulate the subform recordsource on the mainform current event


    me.subformname.form.recordsource="SELECT * FROM someTable WHERE soundex(namefield)='" & soundex(me.namefieldParent) & "'"

  12. #12
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    heres an example of a name search which uses an exact match, a levenschtein distance and a soundex match.

    searchdb.zip

    The search loops through the names and constructs an array of the PK's for any matches or near matches. If matches are found you are presented with a list to choose from or you can choose to continue and add a new person. If no matches are found you go straight to entering a new person.

  13. #13
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by moke123 View Post
    heres an example of a name search which uses an exact match, a levenschtein distance and a soundex match.

    searchdb.zip

    The search loops through the names and constructs an array of the PK's for any matches or near matches. If matches are found you are presented with a list to choose from or you can choose to continue and add a new person. If no matches are found you go straight to entering a new person.


    Thanks a lot!!!!!!!!!!!!! GOD BLESS YOU!!!!!!!!!!!!!!!!!!!!!!!

  14. #14
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by Micron View Post
    Gotcha. From what little I know of the concept, you'd have to run the function on both the child and parent linked fields and test for a numerical match.


    Thanks a lot!!!!!!!!!!!!! GOD BLESS YOU!!!!!!!!!!!!!!!!!!!!!!!

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

Similar Threads

  1. similar to a soundex search?
    By Jen0dorf in forum Access
    Replies: 2
    Last Post: 08-09-2017, 10:54 AM
  2. Soundex search not repeating on fail
    By Jen0dorf in forum Access
    Replies: 10
    Last Post: 07-28-2017, 05:33 AM
  3. Soundex search not working on repeat
    By Jen0dorf in forum Access
    Replies: 6
    Last Post: 06-12-2017, 11:50 AM
  4. Soundex query code
    By Jen0dorf in forum Access
    Replies: 9
    Last Post: 04-14-2016, 02:01 PM
  5. Soundex Search
    By alphabetsoup in forum Queries
    Replies: 3
    Last Post: 10-05-2011, 10:47 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