Computer Learning Zone CLZ Access Excel Word Windows

We live on a hunk of rock and metal that circles a humdrum star that is one of 400 billion other stars that make up the Milky Way Galaxy which is one of billions of other galaxies which make up a universe...

-Carl Sagan
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Access >
Back to TechHelp    Comments List
What Event to put VBA Code Upload Images   Link   Email  
Ronald de Boer 
Hi,

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?

Thanks

Ron de Boer
Kevin Yip
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

This thread is now CLOSED. If you wish to comment, start a NEW discussion in TechHelp.
 

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/4/2024 3:51:19 PM. PLT: 0s