I have a main form for orders and a subform for items in the order. As I understand it, the subform OnCurrent event fires both when I move through the subform and when I move through the main form to a different order.
As we know, subform Load and onCurrent events fire before main form events, causing subform events to fire multiple times in response to actions in the main form events. I want to prevent the subform from loading multiple times each time the main form record is changed, by checking a global boolean variable in the main form and only firing the subform's OnCurrent event when the boolean signifies the main form has loaded with a True value.
The problem is, after the main form has loaded the first time, I see no way to prevent the subform from firing multiple times when the main form record is changed. I need some way to set the boolean variable to false when the main form record is changed, but before the subform onCurrent event fires. Then at the end of the main form's OnCurrent Event the boolean will be set to True again.
Since the subform OnCurrent event will always fire first, I need some way to know that it is being fired as a result of the main form record being changed. How am I supposed to get this information? Does anything fire or change before the subform's OnCurrent event when the main form's record is changed?
As we know, subform Load and onCurrent events fire before main form events, causing subform events to fire multiple times in response to actions in the main form events. I want to prevent the subform from loading multiple times each time the main form record is changed, by checking a global boolean variable in the main form and only firing the subform's OnCurrent event when the boolean signifies the main form has loaded with a True value.
The problem is, after the main form has loaded the first time, I see no way to prevent the subform from firing multiple times when the main form record is changed. I need some way to set the boolean variable to false when the main form record is changed, but before the subform onCurrent event fires. Then at the end of the main form's OnCurrent Event the boolean will be set to True again.
Since the subform OnCurrent event will always fire first, I need some way to know that it is being fired as a result of the main form record being changed. How am I supposed to get this information? Does anything fire or change before the subform's OnCurrent event when the main form's record is changed?