Detecting the next control

bailey537

New member
Local time
Today, 21:54
Joined
Jul 10, 2009
Messages
2
Is there anyway to know which control has been selected before leaving the last.

I have a text box that I want to validate the length, but it can be two different lengths depending on what is selected in a combo box.

If a invalid length is typed a msg box appears on exit of the text box. The same happens if the user changes the value in the combo box and the length is longer.

However I also want to be able to not show the warning if the user goes from the text box to the combo box, but I need to be able to know if I have selected the combo box before leaving the text box.

Therefore I can't use Screen.ActiveControl

I have a lot of other controls on the screen so I would rather not reverse it so I check on enter with PreviousControl

Any ideas?

Cheers
 

Users who are viewing this thread

Back
Top Bottom