Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Charlie:
This should work OK, make certain you do the DoDefault() command in the Lostfocus first prior to calling the Form...
HTH,
-Irv.
>My application has two forms visible: one, in the foreground, is a data entry form, the other, in the background, displays a grid of possible duplicate records. The desired behavior is that the user will enter a customer's first & last name in the first form. The last name textbox's .Valid() code then calls a method in the second form that searches for and displays any existing customers with matching names. So far so good. At this point, I want to bring the second form to the top, which is where I'm having the problem.
>
>I know I can't SetFocus() to the second form's grid (or to anyplace else)from the first form's textbox Valid() event. The documentation suggests using .LostFocus() as a place to do that. But when I try, the second form's grid momentarily gets the focus, then focus jumps right back to the first form (in the data entry textbox following the last name textbox). The same occurs when I call the second form's .Show() event. Any ideas on how to keep focus on the second form once it gets there?
>
>Thanks in advance!
>
>Charlie Hancock
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement