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 
Cant Close Form Null Field
Walter Hamilton 
    
4 years ago
I have a form to convert an opportunity to an Active Program.  In order to convert it, the user must assign the Company with the Prime Contract and the associated Charge Code.  I already have a close button, but I need to make it where they get an error message saying they must assign the Prime and Charge Code prior to closing the form.  I'm certain there is already a video on this.  Can somebody point me in the right direction.  The main table behind the form is tbl_Tasks and that table contains the field for Company_ID (Prime) and ChargeCode_ID.
Kevin Robertson  @Reply  
           
4 years ago
Use the Form_Unload Event which can be cancelled if your criteria has not been met.
Walter Hamilton OP  @Reply  
    
4 years ago
Kevin - Can I use an if then else statement?
Kevin Robertson  @Reply  
           
4 years ago
Yes, of course.

Richard covered the Unload Event in Access Developer 8
Scott Axton  @Reply  
        
4 years ago
Walter
Check out the Prevent Close video.  I think  this will guide you in the right direction.
Walter Hamilton OP  @Reply  
    
4 years ago
Scott - That did it.  Thanks.  I was actually watching that video before asking the question and my brain wasn't working as it should.  I was focused on the other form that Richard was using.  Worked like a charm.

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/6/2026 9:42:01 AM. PLT: 1s