The BeforeLineChange event occurs when the contents of a line change in an editable or adds-allowed grid, and the focus moves out of the line. It occurs before the Microsoft Dynamics GP line change event.
grid_BeforeLineChange(KeepFocus As Boolean)
• grid – A grid object.
• KeepFocus As Boolean – If True, this parameter prevents the Microsoft Dynamics GP line change event and the VBA AfterLineChange event from occurring, and keeps the focus in the current line.
Use the BeforeLineChange event to check the value of fields in a line, then cancel subsequent line change events if criteria you specify aren’t met.