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 Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Defying code in unbound TextB
Gregory Clancey 
    
3 years ago
Let's say I've a Form with an unbound TextBox which must first receive a value in order to trigger "visiblity=True" for the Form's next data control. This is because in the normal course this field must have a value to become part of the criteria for a pending function.

In such chases, I've been providing its TextBox's "ON LOST FOCUS" Event with something akin to "If not isnull(x_textBoxName). . ."

I'm looking for a better Event for this sort of chequepoint because, should I happen to be in "x_textBoxName" when I opt to do anything else - say close the Form - my code no longer simply performs the desired blockage of proceeding without the data entry, but actually prevents execution of the close request. I think I use a "Ctrl-F4" by instinct.

Any more acceptable practice? Thanks.
Alex Hedley  @Reply  
           
3 years ago
Have you tried {AfterUpdate}?
Gregory Clancey OP  @Reply  
    
3 years ago
Thanks for the idea, but will this work if I attempt a Form close before making any entry?
Gregory Clancey OP  @Reply  
    
3 years ago
I wonder if I may place a conditional statement somewhere that will circumvent the restriction?
Gregory Clancey OP  @Reply  
    
3 years ago
Ah! I see what you may be on to.

If I locate the "empty TextBox not allowed code" in the NEXT TextBox in the tab order, I can bail out of the data entry before typing (which is the natural likelihood); and yet, still ensure that execution will not proceed until the required data are provided.
Gregory Clancey OP  @Reply  
    
3 years ago
. . .or (I'm brainstorming)
cause the emptiness of the TextBox to prompt the user to return to it to provide a value or to execute a Form closure right then-and-there. This would actually make the condition of the TextBox the means of closing, thus saving the need to grope around with the mouse for the "close" button (or the tiny "x")

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 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 7:42:59 AM. PLT: 0s