I have a form that checks the format of a phone number on the textbox's OnLoseFocus event. I also have a cmdbutton that is used for saving the form data which also validates the data in that textbox. My problem is that if the textbox has focus then I click save and the data in the textbox isn't correct, I get 2 MsgBoxes warning of the incorrect format...one in the OnLoseFocus event of the textbox and one in the onclick of the cmdbutton. Is there a way to check which control on the form had focus last without having to set up a global variable that I set in each of the control's onfocus event? It would be nice if there's some property I could place in a conditional statement inside the cmdButton click event to decide wether or not to display the MsgBox.