I have an MDI app with a toolbar. The code in ButtonClick for the Save button simply calls the save functionality on the active child form. I also have placed textbox field-level validation throughout the app in the lostfocus subroutines.
The problem: If I enter data into a given textbox BUT DO NOT TAB OFF then press the save button on the toolbar, the save functionality gets fired without the field-level validation getting fired. The result is that invalid data can get saved to the database.
Question: How can I get the field-level validation to fire in the described scenario? It is not acceptable to do field-level validation at save time.
Using setfocus to change the focus to another control does not fire the lostfocus on the original control (already tried to do this).
Basically, since the Toolbar is on the MDI form, clicking a button on it does not make the control on the Child form lose focus. How do I get around this?
Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.
What are they?
An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…