Ah yes. I was bitten by that as well. I just do a setfocus to the active control. This has the same effect as your technique.
>Many of y'all know this one but many more might not. I had forgotten it and it bit me in the butt with a client:
>
>When calling a Save routine from a Toolbar button or Menu option, the changed data in the current control may not be saved. Why? Because the Control never really loses focus and, therefore, the underlying ControlSource is not updated with the new Value.
>
>The trick is to force a LostFocus. A good way to do that is to SetFocus() to an OK button or other non-databound control in the same Form.
Précédent
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