Results 1 to 2 of 2
  1. #1
    LargelyClearSkies is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Posts
    1

    Check if name exists, if it does autocomplete, if it doesn't allow user to add new name

    Hi, could someone help me out please?

    I have a table full of contact details, with a unique contact ID, FirstName, LastName, Email address etc.
    Another table contains company details; Company Name, Address etc and this is linked to the contacts table by the Contact ID



    Then a form pulls everything together so I can see that Company A is at Front Street and Joe Bloggs is their main contact.

    As it stands, this is fine. But if Joe Bloggs also started working for Company B and I add his details to the form for Company B, he is duplicated in the Contacts table with a new Contact ID.

    What I'd like to do is open the form, start typing Joe's name into the contact field and somehow:
    • check if this name exists
    • if it does, then autocomplete the rest of the fields (phone number/email)
    • if it doesn't then allow me to add a new contact


    All help gratefully appreciated!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    In Access 2013 there is an Autocomplete control for fields of type Text. However, It seems what you may need is a combobox control and maybe a Not In List event handler.
    https://www.accessforums.net/program...tml#post276848

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

Similar Threads

  1. Replies: 5
    Last Post: 02-04-2015, 07:53 PM
  2. Check to see if record already exists
    By zipaway in forum Programming
    Replies: 4
    Last Post: 06-05-2014, 09:16 AM
  3. Replies: 10
    Last Post: 10-30-2013, 02:06 PM
  4. Replies: 1
    Last Post: 03-21-2013, 02:14 PM
  5. Check if record exists, Check Number
    By burrina in forum Forms
    Replies: 9
    Last Post: 01-06-2013, 03:49 PM

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