The BeforeGotFocus event occurs when the user moves the focus to a field, using the TAB key or the mouse. It occurs before the Microsoft Dynamics GP got focus event.
field_BeforeGotFocus(CancelLogic As Boolean)
• field – A window field object.
• CancelLogic As Boolean – If True, the event cancels the Microsoft Dynamics GP got focus event, and the VBA AfterGotFocus event.
Use the BeforeGotFocus event to set or evaluate the contents of the field gaining focus, and cancel any further got focus events for the field from running (the Microsoft Dynamics GP got focus event and the VBA AfterGotFocus event).
If Microsoft Dynamics GP uses its got focus event, it typically checks the value of the field that’s gaining focus, and performs calculations or sets other field values based on that value. However, the accounting system uses this event infrequently to do such operations.