The BeforeLostFocus event occurs when the user moves the focus out of a field, using the TAB key or the mouse. It occurs before the Microsoft Dynamics GP lost focus event.
field_BeforeLostFocus(KeepFocus As Boolean, CancelLogic As Boolean)
• field – A window field object.
• KeepFocus As Boolean– If True, the focus returns to the current field.
• CancelLogic As Boolean – If True, the event cancels the Microsoft Dynamics GP lost focus event, and the VBA AfterLostFocus event.
Use the BeforeLostFocus event to evaluate the value of the field losing focus, and perform any additional operations in the window. You cannot set the value of the field losing focus using the BeforeLostFocus event. This event follows the Microsoft Dynamics GP user changed event, which is used to verify the contents of the field losing focus.
The BeforeLostFocus event occurs immediately before the Microsoft Dynamics GP lost focus event. The accounting system rarely uses its lost focus event. When it does use this event, it typically locks control fields (fields that control the display of a record).