Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Table-Level Validation < Images | Runtime >
Back to Table-Level Validation    Comments List
Upload Images   Link   Email  
Validation Rule
Andrea Buckridge 
     
3 years ago
I am trying to set up a validation rule in a table to keep me from making mistakes.  I must submit paperwork before completing a load.  Both of these fields are yes/no fields. How do I word a validation rule that would not allow me to mark a load complete until I have marked Paperwork Submitted?
Kevin Yip 
     
3 years ago
A validation rule controls what values you can enter.  It does not control whether you can enter it or not, which is what you need here.  To prevent user entry, one way is to disable the control on the form.  The control will be greyed out, thus preventing entry.  This needs to be done with VBA.  The code below enables or disables the [LoadComplete] checkbox field depending on whether the [PaperworkSubmitted] checkbox field is True or not:

Me!LoadComplete.Enabled = Me!PaperSubmitted

Put this line in the AfterUpdate event of [PaperSubmitted] and the Current event of the form.

You need some knowledge on VBA, the "event-driven" system used in VBA, and the purpose of events such as AfterUpdate and Current.  The other posters will hopefully point you to the right courses to take, if you don't have this knowledge already.
Kevin Robertson 
          
3 years ago
Here are the videos Kevin Yip was talking about:

AfterUpdate Event
On Current Event

Also watch: Intro to VBA
Andrea Buckridge OP 
     
3 years ago
Thank you!
Andrea Buckridge OP 
     
3 years ago
Is there also a way to do this between tables?  I can have up to 6 loads linked to a trip. I need a way to prevent a trip from being marked completed until all linked loads are also marked completed.
Richard Rost 
          
3 years ago
Andrea Buckridge OP 
     
3 years ago
I'm sorry Mr Rost, I don't follow you.  How does a DLookup work for this? Do I write the DLookup into the vba somehow?
Andrea Buckridge OP 
     
3 years ago
Thank you again Kevin!  It works great on my load form!  Thank You Mr. Rost for the awesome classes and tech help videos!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Table-Level Validation.
 

 
 
 

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 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/23/2025 5:42:23 PM. PLT: 2s