It seems to me that getting a "Reserved" error indicates something is drastically wrong and it isn't syntax. Getting oddball and seemingly inappropriate error messages often signals the presence of corruption. Do you recall ever getting an error about "Unreadable Format" and you did a compact & repair to recover it?
First thing to look at: In the code window, when you look at Tools >> References, are any of the checked references showing either the word Missing or the word Broken on the same line as the named library?
Second thing to try: Have you done a compact & repair on this DB lately (or at all)? If you did a C&R in response to the "Unreadable Format" message mentioned earlier, your answer is YES but one more try probably wouldn't hurt. On the other hand, it might not help either in that case.
Third thing to try: Look at this article (linked below) and DECOMPILE your code, then recompile it.
Decompile and Compact Your Microsoft Access Database to Improve Performance and Fix Corruption
www.fmsinc.com
Fourth (and ugliest) possibility: You might have to build a new, empty database and use the External Data feature in the ribbon to copy everything from your old DB to your new one because something internal has become corrupted.
I think I solved this. I have created a query to get the Total count of the Records based on my two criteria and then create a Subreport then in the Record Source give that query and it's working fine.
However, I would advise you to be on the lookout for a return of inexplicable errors that don't seem to apply to the line of code (or section) being called out. If you start getting unexplained errors, reconsider the possibility of corruption.
I think I solved this. I have created a query to get the Total count of the Records based on my two criteria and then create a Subreport then in the Record Source give that query and it's working fine.