Access MS Access DCount function problem

Joined
Jul 22, 2015
Messages
1
Reaction score
0
Hi,

I am new to the forum and am hoping someone can help me with a DCount function problem I am having in MS Access.
I have report that is run from a query that selects records between 2 dates. The query runs fine, in the report I have a control box (TotalTrade) in the footer section with the following expression:

TotalTrade = DCount("[Tradecnt]","qryTradeJournalDateCloseDate")

This gives me an #error message, if I change the domain part to a table that the query is sourced from call tblTradeJournalData the DCount function works fine, for the life of me I cannot work out why the error when referencing my query, the spelling is correct for the query name.

I know I could just use the Count function, but from this I was going to use the criteria part of the function to count certain records based upon another field called WinLoss which is a text field, I thought I would start simple and then move into the more complicated aspect

Thanks
BT
 
Back
Top