T
Troy
Hi!
I have a form with a subform on it. On the subform I have totals on the form
footer. I have a subprocedure on the main form and the subform that checks
the totals on the sub form against field values on the main form changing
the subform totals textbox background colour to green if valid or red if
invalid. I have a command button on the main form and on the subform that
executes each respective sub procedure. I also executed the sub procedure
from the OnActivate Event and the Current Event for the main form.
The problem is that when I open the form the subprocedure runs but the
colours are wrong. If I set a break point in the subprocedure and open the
form and step through the code the colours are correct. If I run the
subprocedure from the command buttons the colours are correct.
It's as if the data in the total fields or the main form fields(the data
that is compared in the subprocedure) is not yet there as the form is
opened.
An insight into why this happens and a solution would be appreciated.
Thanks
Troy
I have a form with a subform on it. On the subform I have totals on the form
footer. I have a subprocedure on the main form and the subform that checks
the totals on the sub form against field values on the main form changing
the subform totals textbox background colour to green if valid or red if
invalid. I have a command button on the main form and on the subform that
executes each respective sub procedure. I also executed the sub procedure
from the OnActivate Event and the Current Event for the main form.
The problem is that when I open the form the subprocedure runs but the
colours are wrong. If I set a break point in the subprocedure and open the
form and step through the code the colours are correct. If I run the
subprocedure from the command buttons the colours are correct.
It's as if the data in the total fields or the main form fields(the data
that is compared in the subprocedure) is not yet there as the form is
opened.
An insight into why this happens and a solution would be appreciated.
Thanks
Troy