Results 1 to 2 of 2
  1. #1
    bdhFS is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    32

    Validating data entry in a form

    Thanks for your help...

    I have a form with only two tables. The parent table stores Sessions with a Start Date and End Date. The child table stores data about a tower and there can be many towers. There should only be on tower entered per session, but there are 25 different towers.

    I want the form to check if a tower has been entered during a session, and if it has, don't allow them to enter it again.

    Session 1

    Tower 29
    Tower 40
    Tower 42
    Tower 6
    Tower 2
    Etc


    Session 2

    Tower 29
    Tower 40
    Tower 42
    Tower 6
    Tower 2


    etc.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I would use the before update event of the form:

    http://www.baldyweb.com/BeforeUpdate.htm

    In your case, you can use a DCount() to test if a tower/session combination already exists.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Creating data entry form
    By ksukat in forum Forms
    Replies: 3
    Last Post: 03-11-2010, 04:55 PM
  2. Validating Field Data Across Tables?
    By venomshot in forum Forms
    Replies: 4
    Last Post: 02-04-2010, 05:04 PM
  3. Can't get new field to show in my data entry form
    By Suzie in forum Database Design
    Replies: 19
    Last Post: 12-21-2009, 03:48 PM
  4. Form Data Entry Problem?
    By corystemp in forum Database Design
    Replies: 1
    Last Post: 03-21-2009, 02:29 PM
  5. Run report or sub form during data entry
    By wasim_sono in forum Programming
    Replies: 0
    Last Post: 03-09-2006, 05:40 AM

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