By Richard Rost 3 years ago
Learn the On Current Event in Microsoft Access
In this Microsoft Access TechHelp tutorial, I will show you how to run VBA code when the user opens a form and moves from record to record. This is handy if you are doing things like changing the visibility or colors of different fields based on user input.
David asks: "In my form, I have certain fields that are made not visible based on the user’s input in other fields. For example, if the customer is not active, I can hide his Credit Limit. I used an After Update event for this. However, when I open the form or move from record to record, the Credit Limit field is still visible. How do I hide this field based on the current customer’s existing value?"
I'll show you how to make custom subroutines (so you don't have to have the same VB code twice in your form), changing the color of fields and the background color of the form, using the MsgBox function to return a value (yes or no), setting the customer's credit limit to $0 if they become inactive, changing a check box into a Toggle Button, and setting its caption and color properties too! Lots more for members!
Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the database template from class plus get access to the Code Vault. If you signed up on YouTube you have to register on my YouTube Find User page so I can set up your account here on my web site. If you're not a member, Join Today!
After Update: https://599cd.com/AfterUpdate
Subscribe to On Current
Get notifications when this page is updated