Computer Learning Zone CLZ Access Excel Word Windows

The universe is a pretty big place. If it's just us, seems like an awful waste of space.

-Carl Sagan
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
Home > TechHelp > Access >

Back to TechHelp

What Event to put VBA Code Upload Images   Link  
Ronald de Boer 
3 months ago

I have a unbound field with an immediate if statement in it in a Subform.  The immediate if is working properly and displays the result I expect.

I need to set filter on with the result of this unbound field and then run some other VBA code.  I currently have this code in the Oncurrent event but when in debug the unbound field is blank.  I am assuming the Oncurrent Event is before the field has been evaluated to populate the result.

Please note this Sub form has all field disabled and is used for display purposes only. Therefore all on On Focus, Lost Focus etc won't work as I understand them.

What event can be used for the code I need to run after the unbound field has been evaluated and the result displayed on the screen?


Ron de Boer
Kevin Yip
3 months ago
Is your field a calculated field, with a formula as the control source (see picture below)?  If so, it isn't really unbound.  Unbound means the control source is blank.  A calculated field is evaluated for ALL rows when a form opens.  It works like actual bound fields in a continuous form or datasheet: whichever row is the current row, you see updated values in all the rows, all the time.  They don't wait for the Current event to run to evaluate themselves.  If you see an incorrect value in your calculated field when the Current event runs, maybe the code in the Current event causes the formula of the field to not work properly.
Kevin Yip
3 months ago

This thread is now closed. If you wish to comment, start a NEW discussion, below.

Back to TechHelp Comments

Start a NEW Conversation
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
Subscribe to TechHelp
Get notifications when this page is updated

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.

Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
My Account
My Courses
Lost Password
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Customer Support
Web Site Tour
Consulting Services
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard

Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Copyright 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 2/3/2023 10:03:10 PM.