Results 1 to 2 of 2
  1. #1
    Headford is offline Novice
    Windows Vista Access 2007
    Join Date
    Aug 2012
    Posts
    2

    Stop Duplicate entries in a sub form


    I have a sub form which entries are added the mail form is a particular course. I need to stop users entering duplicate entries. The values are customerid and resourcetypeid. I need thebeforeupdate event to check if any entry is entered for an employee before updating the form.

  2. #2
    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,716
    You can do this by setting up some referential integrity.
    What tables supply data to your form and subform?
    How are these tables related?

    In a typical set up the tableInMainForm is in 1 to Many relationship with TablesInSubForm.
    There will be linking fields identified in the form properties.

    You can also do a check in the before update event to ensure a "parent record" exists.

    I'm not sure how your
    customerid and resourcetypeid relate to Employee.
    Can you give us a little blurb on your database and how these forms fit in the overall picture?

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

Similar Threads

  1. Stop Duplicate name entry
    By bharatdubole in forum Access
    Replies: 1
    Last Post: 12-03-2012, 06:11 AM
  2. Duplicate Entries
    By brownk in forum Reports
    Replies: 3
    Last Post: 09-11-2012, 12:56 PM
  3. Replies: 1
    Last Post: 04-25-2012, 01:57 PM
  4. Replies: 1
    Last Post: 12-09-2011, 07:34 AM
  5. Replies: 2
    Last Post: 11-29-2009, 12:00 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