Calling a subroutine on another form
I never knew that you could do this. I was asked to give some assistance at a friends place of work and was rather startled to come across the following line of code.
'Update the calculated hours shown on the TransactionTotals Form
Call Forms.TransactionTotals.UpdateEmployeeHours
Nice. I can see how that would be useful at times. I just setup a routine myself for enabling/disabling command buttons on a main menu from a global options form.
The called routine needs to be a public routine. And the forms name can't have any blanks in it. Or maybe it can but enclosing the form name in square brackets didn't work so i don't know the syntax.
When I have some more time, and I have his permission, I'll document some of the interesting UI we put in that system to make the data entry as clear and rapid as possible. For example the above TransactionTotals form knows what kind of hours the employee usually works so flags any entries with hours below the standard value in yellow and any entries with hours over the standard values in red. Of course if the employee has the correct number of hours then it's green.