Results 1 to 2 of 2
  1. #1
    jms is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Posts
    1

    Before Update code

    Hello

    I am an access novice. I have created a very simple form. The primary key is an ID number. I would like access to alert me if I accidently enter the same ID number in more than one form. I have spent several hours searching the internet for how to do this, and it appears that I need to write some code in "Before Update". I am unsure how to do this exactly, as I have tried several times and it seems to never work.
    My form is called "Macintosh and McGrath". The primary key is called "ID". Can anybody help me?

    thanks


    jms

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    Is your id field set to No duplicates?
    If so I take it you mean you want the message box instead of the default Access message?

    If not just switch on No Duplicates.

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

Similar Threads

  1. Update Statement in form code
    By ksmith in forum Programming
    Replies: 9
    Last Post: 11-07-2011, 12:04 PM
  2. Word code in Access - How to modify my current code
    By Alexandre Cote in forum Programming
    Replies: 0
    Last Post: 11-15-2010, 08:26 AM
  3. Code in combobox, code in text box
    By float in forum Forms
    Replies: 3
    Last Post: 09-29-2010, 07:12 AM
  4. Replies: 3
    Last Post: 04-14-2010, 10:07 AM
  5. Code to Update Excel from Access
    By portmancp in forum Programming
    Replies: 2
    Last Post: 03-10-2010, 03:06 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