In the standard module mod Rib Con2007Bug Killer add the following VBA procedure: Now that we have gained control of the On Exit event there are lots of neat things that you can do with your CCs.
You may need mandatory information (i.e., a CC that can't be left blank), or a phone number/SSN in a proper format, or some other rigid data format. Text = "" Else If Val(str Temp) Int(Val(str Temp)) Then Msg Box "" & str Temp & "" & " is not a whole number. With a functional On Exit event your ability to validate CC data is practically limitless.
Let's add five more CCs to our document and title them "Name," "Whole Number," "SSN," "Pass Code," and "Phone Number." With the exception of "Name," which we will make a mandatory field, the other titles illustrate that a specific data format is required. Showing Placeholder Text = True Or Not Is Numeric(str Temp) Then Msg Box "" & str Temp & "" & " is not a valid number. You can create your own validation module as shown above or download and use a copy of the document I used to create this tips page. I hope you have found this Microsoft Word Tips page informative and helpful.
There may be occasions where we need to be more flexible in our approach, and we may just want to warn the users of the database that data is missing when they are entering a record into the form.
When we are entering the data, it is possible to respond the the data entry event, and use a Microsoft Access Msg Box function to perform different actions depending on what the database user wants to do.
Handing Form Closing Validation without Canceling in the Validation event: In the case where you are not setting the Validating $_.