Results 1 to 4 of 4
  1. #1
    mafrank101 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    12

    Data validation warning vs error

    We have a form with a couple of data entry fields that are similar, but one is used much more often than the second. Occasionally a value is entered into the second by mistake. Since sometimes it is OK to enter data into this field, I cannot put a validation rule on it to limit what is entered, but I would like to have a warning pop up that says something like "Are you sure you meant to enter data into this field?".

    Is there a way to do this?

    We're using Access 2003.

    Thanks

  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,521
    You can use the before update event of the textbox or form, a Yes/No message box to gather the user's response, and Cancel = True to stop the update if appropriate. Here's an example of how the before update event is used:

    http://www.baldyweb.com/BeforeUpdate.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    mafrank101 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2010
    Posts
    12
    Thanks, that pointed me in the right direction to get a solution.

    I ended up simply using the Code Builder on the Before Update event that essentially said:

    MsgBox "Are you sure this is the right information?"

    Now if anything is entered into that field it pops this up, which should prompt the data entry people to double check what they did. They can simply click <OK> and move on if everything is correct.

    Thanks again!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problemo, glad you got it working.
    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. Replies: 7
    Last Post: 11-22-2009, 02:38 PM
  2. Print custom date for data validation
    By TheFuzzball in forum Database Design
    Replies: 2
    Last Post: 10-26-2009, 06:48 AM
  3. Referencing table data in field validation rule
    By toad848 in forum Database Design
    Replies: 3
    Last Post: 03-19-2009, 07:03 AM
  4. Data Validation - Please help
    By larry S in forum Access
    Replies: 0
    Last Post: 11-16-2008, 10:24 PM
  5. Security Warning
    By mojo53777 in forum Security
    Replies: 0
    Last Post: 11-16-2007, 06:23 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