Q:

MS Access Tab Control Name with Number of Records

I am developing an Access database (using Office 2016) and have several tab controls which I want to display the number of records in the subform/subreport. 
After a lot of searching etc I have it working for the subforms using a function which I call in the main forms current event (but in a seperate function so I can also call via a macro when I change the main forms record with a combo box, as it wasn't updating otherwise). The code I am using is:
Function ClientTotals()

Dim i As Integer
i = Form_sbfrm_ClientContacts.Recordset.RecordCount
Form_frm_Clients.ClientTabs.Pages("Contacts").Caption = "Contacts (" & i & ")"
End Function

This works perfectly for me and my tab name becomes "Contacts (No. of records)" but I can't get the syntax right to change this to work for a report, is it possible?
I have tried:
Function ClientTotals()

Dim i As Integer
i = Form_sbfrm_ClientContacts.Recordset.RecordCount
Form_frm_Clients.ClientTabs.Pages("Contacts").Caption = "Contacts (" & i & ")"

Dim j As Integer
j = Report_rpt_CurrentProjects.Recordset.RecordCount   ' this line is highlighted with the debugger
Form_frm_Clients.ClientTabs.Pages("Current Projects").Caption = "Current Projects (" & j & ")"

End Function

As well as:
Dim j As Integer
j = rpt_CurrentProjects.Report.Recordset.RecordCount  ' this line is highlighted with the debugger
Form_frm_Clients.ClientTabs.Pages("Current Projects").Caption = "Current Projects (" & j & ")"

and various others.
Another question I have is why is the syntax for the form "Form_sbfrm" etc    and not using a "!". If I change to "!" it bugs out.
Thanks for your help, KAL

A:

Recordset if you need to return complex data, if you need one value, a total or a sum, Domain functions are the way to go.  Don't overdue them though, having too many on a form or a report can start to bog down usability.
Glad I can help.

