Hi guys,
I'm sure this has been answered in here already but with the search facility being down...
On my main form I have a control ctl_InvoiceTotal. This is a DSum calculation on tbl_Invoices and works fine.
When Subform frm_deliveries is updated (button clicked) it adds values into tbl_Invoices. What I want to do, is when subform frm_Deliveries is updated I want to recalculate ctl_InvoiceTotal on the main form. I am currently using this code in the OnClick event of my updating button (in the subform):
This works fine, updating the control OK. However, the current record in the subform jumps back to the beginning!! Any ideas?
Thanks,
Jason
I'm sure this has been answered in here already but with the search facility being down...
On my main form I have a control ctl_InvoiceTotal. This is a DSum calculation on tbl_Invoices and works fine.
When Subform frm_deliveries is updated (button clicked) it adds values into tbl_Invoices. What I want to do, is when subform frm_Deliveries is updated I want to recalculate ctl_InvoiceTotal on the main form. I am currently using this code in the OnClick event of my updating button (in the subform):
Code:
'refresh Invoice Total control
Dim vInvoiceTotal As Control
Set vInvoiceTotal = Forms!frm_NewOrder!ctl_InvoiceTotal
vInvoiceTotal.Requery
This works fine, updating the control OK. However, the current record in the subform jumps back to the beginning!! Any ideas?
Thanks,
Jason