I have a query called qry-OA_ this_ month’s_ hours and would like to show the total number of distinct full names in a report footer. I have a field called full (which is a concatenation of [Last Name] & [First Name]). Here is my code:
Dim dbsmember As Database
Set db = CurrentDb
Dim rst As Recordset
Dim inttotmems
Set rst = CurrentDb.OpenRecordset(“SELECT distinct [qry-OA_ this_ month’s_ hours].full FROM [qry-OA_ this_ month’s_ hours]”)
inttotmems = rst.RecordCount
Text33 = inttotmems
I am getting a runtime error 3061 “Too few parameters. Expected 2” message. What am I doing wrong?
Thanks, in advance.