Hi!
I'm wondered, which event of the button fires data saving? When button clicked by mouse, LostFocus event should fire before click event... Well, if your button is default and user press Ctrl+Enter, problem might occur.
It is not only the problem of the LostFocus method. For example, when you use KeyPress event of the form or ON KEY LABEL to fire data saving when user press Ctrl+S, Valid event not fire causing some strange violation of normal form behaviour. This applies also when saving fired from menu item or toolbar.
One of the solutions is to call special method that will get the active form and its active control property to get the current control and manually call Valid event of this control or change focus before saving.
HTH.
>I have a container that contains a few fields, and when the container loses the focus it saves the details in these fields, this is done by a procedure because of certain differences from other fields.
>
>When I click on my Save button though, it seems to call the Lost Focus after the save, and this is no good.
>
>Is there any other way I can ensure that data within a container is saved other than Lost Focus.
>
>Thanks
>Kev
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.