I have a Time card form that has two subforms. One subform, "HoursSubform," contains the table that contains the hours, e.g.,
The second subform, "QuerySubform," has a Query that totals up the hours --
I want to update the Query Subform every time the user changes their daily hours. I created a button on the TimeCard form the runs QuerySubform.Requery on the OnClick event. It works great, except I don't want the user to have ato click a button every time they want to update their hours. I'd rather update when the user changes a value in HoursSubform by running QuerySubform.Requery on the OnChange event, or another equivalent event. The trouble I'm having is that it doesn't appear that HoursSubform can 'see' QuerySubform because I'm getting a run-time error "Object Required" when it hits the line that references QuerySubform.
Is there a way to call QuerySubform from another subform and not from the main form? If there's an alternative way to accomplish this, I'm all ears.
Thanks!
Rich
Code:
Job Mon Tue Wed Thu Fri Sat Sun Total
------- --- --- --- --- --- --- --- -----
Smith 6.0 8.0 5.0 7.0 26.0
Jones 2.0 8.0 3.0 1.0 14.0
Code:
Mon Tue Wed Thu Fri Sat Sun Total
--- --- --- --- --- --- --- -----
8.0 8.0 8.0 8.0 8.0 40.0
Is there a way to call QuerySubform from another subform and not from the main form? If there's an alternative way to accomplish this, I'm all ears.
Thanks!
Rich