Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2008

    Question Unanswered: Creating a lookup query for unique names


    I am not hugely experienced with Access so sorry if I am asking a simple question here!

    I am creating a table called People. In the table is a field requesting the person's Nationality. I am in the design view of the table and I know under Lookup I can create some kind of query which updates the list box every time a new value is entered into the database. For example you might come to enter your nationality and there be no option for French, so you can enter French into the field without using the list box suggestions. The next time somebody comes to enter a value to this field, French will appear there in the list box. Obviously I only want it to list French once regardless of how many times it appears in the table.

    Hope this makes sense!

  2. #2
    Join Date
    Mar 2008
    It's ok! I think I got it figured now:

    SELECT DISTINCT [People].[Nationality] FROM People;

  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    In my books you should consider moving that to another table, afteralkl what is one person French is another persons Français
    you need to make sure you users use the same captilaisation ' FRENCH' isnt the same as 'FRENCH'

    mind you do you really mean nationality.. or do you mean country of residence. different things altogether..... there are some 240 countries in the world, a full list is farily easily available.

  4. #4
    Join Date
    Feb 2004
    One Flump in One Place
    Also be very careful of using lookups in tables. They look like nice handy functionality but have been the cause of corruption. I'm with Mark - simple lookup table. This will also be more efficient. Combo box on the form, not in the table.
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Nov 2007
    Adelaide, South Australia
    Agreed with poots. I never use lookups in tables either.
    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