Ensuring a Field is tabbed out.

  • Hello Julian,

    What is the best way of ensuring that the OnEditFieldFocus event is fired before a user clicks anywhere else in the application, for instance a menu or another control?

    In my application, leaving a field causes the field data to be written to a database if the edit field data and database field data differ.

    Or is there another way I can warn that a field has been edited but not tabbed out (and thus saved).

    Cheers,

    Paul

    • Offizieller Beitrag

    Hi,

    You can add code to OnExit to make sure your code is called if the focus is moved from the editor, although the cursor (invisible now) is still in the edit field.

    I would save the contents of the edit fields when the form is left - You can do this in OnMailMergeGetText event after a call to MergeText().

    Julian