Why does Access 2007 fire the on click event when a tab control is clicked? - TechRepublic
Question
November 19, 2009 at 03:00 PM
jgitter

Why does Access 2007 fire the on click event when a tab control is clicked?

by jgitter . Updated 16 years, 7 months ago

I’m fairly new to Access 2007 development but this makes no sense. The first field on a multi-tab data entry form is a required field. The user must enter data in the field before leaving it. But I also want to give a user the option to quit adding a record using a command button. I’ve created a global variable to indicate cancel status. It is set to false when the form loads and true when the cancel button is clicked. In the lost focus event of the form field I have code to ensure that something (anything) has been entered. This works okay until I click on another tab on on tab control. That fires the click event to the command button which blows up my validation. Why would clicking on a tab control fire the on click event of a command button? Can anyone help with this?

This discussion is locked

All Comments