Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Replacing Form Error Message With Custom Message
Colin M 

12 years ago
I am wanting to create a Custom Error Message on my order form when a user enters an Order # that is a duplicate of another order.  Each order # entered needs to be unique (no duplicates).  I have set the table field for the number to a text field and as "indexed/no duplicates".   I need for the error message when a duplicate is entered to say something like "Your Order # is a Duplicate. Please enter a unique Order #", as this form will be used by novices.

When I enter a duplicate Order # on the order form I currently get the following error message..."The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."

I am not knowledgeable of VBA code, so need something fairly simple, if possible.  Thanks in advance for your help.


Reply from Alex Hedley:

Hi Colin,
This would require a little VBA BUT I' explained the steps in this TIP.
Give me a shout if you need anything.
Alex

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/17/2026 2:03:24 AM. PLT: 1s