Results 1 to 3 of 3
  1. #1
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88

    Confirm Save of Duplicate Record


    I have a table with games and consoles and it has duplicate names of games because they come in different versions of the same console. I need a way to confirm that the game has been already entered for that console and do a yes/no to continue saving that record...thnx.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    It should all be done in the BeforeUpdate event of your form with a Domain function (DLookup, DCount) maybe.

  3. #3
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Or a composite index could be created using the fields GameName and Console (or whatever you call them). Only if you attempt to add the exact pair of values would Access raise an error message. Alternatively, those 2 table fields could be a composite Primary Key. While some here seem to not like composite PK's, I've never received an explanation as to why not. In fact, I have read a forum post where Allen Browne offered a composite PK as a good solution. What's good for AB is good enough for me.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 3
    Last Post: 02-27-2014, 11:05 AM
  2. Replies: 3
    Last Post: 08-15-2013, 07:50 AM
  3. Replies: 3
    Last Post: 10-08-2012, 08:40 AM
  4. Replies: 8
    Last Post: 09-27-2012, 11:12 AM
  5. Duplicate Record Cannot Save
    By magicscreen in forum Programming
    Replies: 2
    Last Post: 09-15-2010, 08:15 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