I have a main form (frmDataEntry) with a continuous subform within it (fsubJobDetails). Each is based on a separate stored query - qryDataEntry and qryJobDetails resepctively. In frmDataEntry I have a control (txtGrandTotal) with the following control source:
=DSum("[Planned Premier Hours]","[qryJobDetails]")+DSum("[Non Chargable Hours 1]","[qryJobDetails]")+DSum("[Non Chargable Hours 2]","[qryJobDetails]")
It is meant to show the grand total of all the specified records in qryJobDetails - 'Planned Premier Hours', 'Non Chargable Hours 1', and 'Non Chargable Hours 2'. It does work for the first record viewed in frmDataEntry, but when the focus moves to another record, txtGrandTotal remains the same. The same also happens if you change any of the values in fsubJobDetails (and therefore qryJobDetails). I need txtGrandTotal to update for each change made to any of the source fields, and when focus changes to another record.
I suspect I need to save the data in the queries back into the underlying table, but I tried F![frmDataEntry]![fsubJobDetails].Requery from within frmDataEntry but to no avail.
Yes, I tried Refresh, but that had no effect either. Anyway, I have made some substantial redesigns to the way the form(s) fuctions, and it works now. Basically, I had to change it so that the AfterUpdate event in the value fields in the subform initiated a requery to the main form, which causes all the data to be saved and the Grand Total to be updated.