Solved Totals row not displayed on subform but works in query

Kayleigh

Member
Local time
Today, 04:31
Joined
Sep 24, 2020
Messages
709
Hi there

I have encountered an issue which seems to be quite common but can't find a resolution.

I have a subform which is a datasheet. The recordsource is a query. I am trying to add a totals row - it works as a query but will not display in the form. Any ideas why?

This is the base query (qryAccByStaffFilter):
SQL:
SELECT tblTransaction.*, tblTransactionItem.*, Format([fldtdatetime],"mmddyyyyhhnnss") AS cfDateID, lkptblTransEvent.fldEventName
FROM tblTransaction INNER JOIN (tblAccounts INNER JOIN (lkptblTransEvent INNER JOIN tblTransactionItem ON lkptblTransEvent.fldTransEventID = tblTransactionItem.fldTEventID) ON tblAccounts.fldAccountID = tblTransactionItem.fldAccountID) ON tblTransaction.fldTransactionID = tblTransactionItem.fldTTransactionID
WHERE (((tblAccounts.fldAccountTypeID)=6) AND ((tblAccounts.fldContactID)=[forms]![frmStaff]![fldContactID]))
ORDER BY tblTransaction.fldTDateTime;

And this is the recordsource query:
SQL:
SELECT qryAccByStaffFilter.fldTransactionID, Format([fldTDateTime],"dd/mm/yyyy") AS cfDate, [fldTDesc] & IIf(isnothing([fldtnote]),""," - " & [fldtnote]) AS cfNotes, qryAccByStaffFilter.fldEventName, qryAccByStaffFilter.fldTValue, CCur(DSum("fldtvalue","qryaccbystafffilter","val([cfdateid])  <= " & Val([cfdateid]))) AS runTot, qryAccByStaffFilter.fldTDateTime
FROM qryAccByStaffFilter
ORDER BY qryAccByStaffFilter.fldTDateTime DESC;
 
As Pat mentioned, the Totals row has to be applied to each object separately.
Here's a subform with a Totals row

1670442680381.png
 
Totals row has to be applied to each object separately
Can you explain how that is done? I cannot figure out where to do this.
 
With the object (table/query/form) open, click Totals on the Home tab
 
Yes I have tried that.

My latest discovery is it works when form is NOT pop out but when i select pop out the 'totals' are greyed out. But now it works because I already set the totals when form was not pop out. Weird work around!
 
Thanks. That is kind of strange how that works, not in design view.
 
The Totals row isn't a design feature
It is a change to the application interface so has to be applied in form view (or the equivalent for tables & queries)

As @Kayleigh has observed. Totals are disabled on the ribbon for popup forms.
I presume this is because popups are not part of the application interface - they are displayed independently.
However, if added before a form is made a popup, the totals feature still works and each column total type can be edited
 

Users who are viewing this thread

Back
Top Bottom