Hi, I have a user form that has tabs on it.
When I click a button to open the form, I then initialize the form. I have CustomerName.SetFocus which is the first textbox on the first tab. I have found a bug where if the user is on the forth tab for example and closes the application, it will error when reopening with the "Can't move focus to the control because it is invisible..."
It is looking for this CustomerName textbox which is over on the first tab. Is it possible when this form tries to initialize when I click the button to open the form, that it automatically sends the user to the first tab every time, and then it will find that textbox?
Or is there code that can tell what tab the user is on(the current state of the form), and then I could put an if statement in that says depending on what tab you are on, set focus to that tabs textbox instead?
Thanks in advance.
When I click a button to open the form, I then initialize the form. I have CustomerName.SetFocus which is the first textbox on the first tab. I have found a bug where if the user is on the forth tab for example and closes the application, it will error when reopening with the "Can't move focus to the control because it is invisible..."
It is looking for this CustomerName textbox which is over on the first tab. Is it possible when this form tries to initialize when I click the button to open the form, that it automatically sends the user to the first tab every time, and then it will find that textbox?
Or is there code that can tell what tab the user is on(the current state of the form), and then I could put an if statement in that says depending on what tab you are on, set focus to that tabs textbox instead?
Thanks in advance.