Using the On Unload Event to Perform Data Validation When a Form Closes in Microsoft Access
In this Microsoft Access tutorial, I'm going to teach you how to use the On Unload event to perform data validation across multiple records and provide a friendly error message when you go to close a form in Microsoft Access. Freya from Oslo, Norway (a Platinum Member) asks: I have a form where my employees enter a number of job codes for a particular project. Each job code is on a separate record. They have to enter at least five job codes but no more than eight. Is there any way I can check that before they're allowed to close the form? BECOME A MEMBER: YouTube: / @599cd or My Site: https://599cd.com/THMember LEARN MORE: On Unload: https://599cd.com/OnUnload PREREQUISITES: Intro to VBA: https://599cd.com/IntroVBA Before Update: https://599cd.com/BeforeUpdate DCount: https://599cd.com/DCount LINKS: Double Double Quotes: https://599cd.com/DoubleDouble RECOMMENDED COURSES: Access Developer Courses: https://599cd.com/Developer FREE TEMPLATE DOWNLOADS: TechHelp Free Templates: https://599cd.com/THFree Blank Template: https://599cd.com/Blank Contact Management: https://599cd.com/Contacts Order Entry & Invoicing: https://599cd.com/Invoicing More Access Templates: https://599cd.com/AccessTemplates ADDITIONAL RESOURCES: FREE Access Beginner Level 1: https://599cd.com/Free1 How to Use Access in 30 Minutes: https://599cd.com/30Minutes $1 Access Level 2: https://599cd.com/1Dollar Donate to my Tip Jar: https://599cd.com/TipJar Get on my Mailing List: https://599cd.com/YTML Contact Me: https://599cd.com/Contact TechHelp: https://599cd.com/TechHelp Consulting Help: https://599cd.com/DevNet Twitter: / learningaccess https://en.wikipedia.org/wiki/Microso... https://products.office.com/en-us/access https://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, On Unload Event, Data Validation, Form Closing, Error Messages, Multiple Records, Validation Rules, Friendly Error Message, Form Controls, Records Validation, form close, on close, on unload, Form.Unload QUESTIONS: Please feel free to post your questions or comments below. Thanks.

How to Copy & Paste Data to/from the Clipboard in Microsoft Access

How to Use Form Controls as Query Criteria in Microsoft Access - Search Form

Making Automatic Form Resizing Work for You

This Battery Lasts for 30 Years And China Just Put It on the Grid

Avici, Alan Walker, Coldplay, Martin Garrix & Kygo, The Chainsmokers Style 🌞 Summer Mix #26

40. VBA - DoCmd (Programming In Microsoft Access 2013) 🎓

We Bought a $1,000 Abandoned CAT 400 Haul Truck

Fixing Automation Error Catastrophic Failure in Microsoft Access - QQ 99

Free Event: Power BI Beginner to Pro 2026 Edition - Full Hands-On Tutorial

How to Make an Automated Data Entry Form in Excel (Step-by-Step Tutorial)

Understanding Recordsets in Microsoft Access VBA - a Beginner's Guide

The Riskiest Moment of the AI Bubble

Avicii, Dua Lipa, Coldplay, Martin Garrix & Kygo, The Chainsmokers Style - SUMMER DEEP HOUSE Mix

Excel 2021 Full Course Tutorial (3+ Hours)

How to Open a RecordSet in Access VBA and Loop Through the Records

How to Add Simple User-Level Security to Microsoft Access Databases

Best of 80s Music Legends - Tears For Fears, Madonna, Cyndi Lauper, Modern Talking, Michael Jackson

Sluggish Form? Optimizing Form Performance for Faster Loading in Microsoft Access

99% of People Use Microsoft Outlook Wrong

