Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    660

    Unanswered: check country misspelled.

    We have a new user, she typed wrong county name sometimes. We would like to find all the wrong county misspelled to correct. Do we have country spell function? As so many countries in the world, it is not efficient to check each coutry. Could you please give me idea? Thank in advance.

  2. #2
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    Not the easiest....

    but probably the best in the long run.

    You should have (possibly import) a country table and force the entry to be in that table. To find any records that are not valid you run a simple query where it is not in the country table.

    Sorry, I wish I knew where you could get a country table, I'm sure there is one probably out there.

    Good luck, Stu
    --If its free, take it for what its worth!

  3. #3
    Join Date
    Mar 2004
    Posts
    660
    We have a country table. The thing is when i worked here. The user can select a country, but also can type physically. That is why it happen.

  4. #4
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    Try this...

    If you already have a good country table, then make the form's field (I assume the data is entered via a form) a combo box and use the country table as the record source.

    To find any records without a valid country do a 'not in' query against the country query.

    Select * from mydatatable where country not in (select country from mycountry table).

    Double check the syntax, it came off the top of my head.

    :-)Stu
    --If its free, take it for what its worth!

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    well in which in my view your design is flawed
    your users should not be able to create a country at run time, unless its through a masterfiles table/form.

    you should not have a combo box which allows users to add countries.. countries are relatively static. .there are some 240 odd which are well defined.. new countries rarely appear (most recently its been the split of Yugoslavia)

    another potential problem is where a country renames itself (eg Burma / Myanmar)

    or where people believe they are a separate country, but that is not recognised by international standards (such as England, Scotland, Wales etc..)

    so it depends on how you are storing your country information. if its in a table then do a mismatched query (use the access query wizard)
    if its free text then do a select distinct on the country name.

    Id strongly reccommend that you have a country table, and use that table's PK as the FK to the detail table

    I have used the ISO country code as the PK.

    you can be a bit sneaky and allow countries not recognised by ISO but still associate them back to he true ISO name. that way round you can cater for diferent spellings, names

    for example some people may insist that Corsica is a country, yet ISO doesn't recognise Corsica as a country, but as part of France
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    In other words, just do it manually. There aren't that many countries to go inventing a "country spell checker". Sure, it's not efficient, but it would have been completed by now.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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