In this Microsoft Access tutorial I'm going to teach you how to have the database warn the user if a particular record exists based on a duplicated field such as the phone number but give them the option to either continue adding the record or to open the existing record. We use a little bit of VBA to accomplish this task.
Avery from Alexandria, Virginia (a Platinum Member) asks: There are a couple of different fields that I track a user by in my database. One is their phone number and although I like to try to keep them unique sometimes there are duplicates between two customers, so I don't want to make it indexed (no duplicates). So I'd like to have it where if my user is entering a new customer's record and the phone number is already in the database it warns me but gives the option to either go to the existing record or continue adding the new record. It's not always practical to search up front.
BECOME A MEMBER:
KZitem: / @599cd
or My Site: 599cd.com/THMember
LEARN MORE:
599cd.com/WarnButAllow
PREREQUISITES:
Intro to VBA: 599cd.com/IntroVBA
Before Update: 599cd.com/BeforeUpdate
DLookup: 599cd.com/DLookup
NZ Function: 599cd.com/NZ
If Then: 599cd.com/IfThen
MsgBox: 599cd.com/MsgBox
LINKS:
Double Double Quotes: 599cd.com/DoubleDouble
DDQ Not Single Quotes: 599cd.com/DDQnotSQ
Prevent Duplicates: 599cd.com/CompositeKey
Indexing: 599cd.com/Indexing
RECOMMENDED COURSES:
Access Developer Courses: 599cd.com/Developer
FREE TEMPLATE DOWNLOADS:
TechHelp Free Templates: 599cd.com/THFree
Blank Template: 599cd.com/Blank
Contact Management: 599cd.com/Contacts
Order Entry & Invoicing: 599cd.com/Invoicing
More Access Templates: 599cd.com/AccessTemplates
ADDITIONAL RESOURCES:
FREE Access Beginner Level 1: 599cd.com/Free1
$1 Access Level 2: 599cd.com/1Dollar
Donate to my Tip Jar: 599cd.com/TipJar
Get on my Mailing List: 599cd.com/YTML
Contact Me: 599cd.com/Contact
TechHelp: 599cd.com/TechHelp
Consulting Help: 599cd.com/DevNet
Twitter: / learningaccess
en.wikipedia.org/wiki/Microso...
products.office.com/en-us/access
microsoft.com/en-us/microsoft...
KEYWORDS:
access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, Create a duplicate entry alert, popup message altering a duplicate, warn on duplicate record but allow entry, Handling Duplicates
QUESTIONS:
Please feel free to post your questions or comments below. Thanks.
Негізгі бет Warn the User on Duplicate Entry but Allow them to Continue Adding the Record in Microsoft Access
Пікірлер: 21