Results 1 to 4 of 4
  1. #1
    cactuspete13 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    53

    Check if record exists based off one field


    I have two tables, one to track basic information (CompanyInfo) and one to track personal information (PersonalInfo). On the form is a field for an SSN. I am trying to set it up so that after entering in the SSN, it checks PersonalInfo to see if it already exists. If it does, drive on; if not, open up a form (NewAccount) to enter new information. Thank you in advance for the help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You could use a combobox that has a RowSource of existing SSNs from the PersonalInfo table. If SSN not in list, then open form to enter new record. Explore the NotInList event of comobox.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    cactuspete13 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Dec 2012
    Posts
    53
    Ok, I set up a combobox with all of the SSNs, then set the macro to open the form. That works, the form opens, I enter the new information, save and close. Go back to the form with that same SSN entered, go to continue entering all the information for that form and it runs the macro again. The only way to get the first form to recognize the new information is to close out the form and open it again.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

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

Similar Threads

  1. Check if record exists, Check Number
    By burrina in forum Forms
    Replies: 9
    Last Post: 01-06-2013, 03:49 PM
  2. Replies: 3
    Last Post: 10-19-2012, 04:30 PM
  3. Replies: 1
    Last Post: 03-06-2012, 06:45 PM
  4. Trouble with check if Exists before Edit or Add Record
    By mrfixit1170 in forum Programming
    Replies: 4
    Last Post: 02-10-2012, 10:38 AM
  5. Check to see if record id exists in joined table
    By csoseman in forum Programming
    Replies: 1
    Last Post: 08-18-2011, 01:06 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