I have posted something similar to this before so sorry if I am repeating myself.
I have an Option Group on a subform containing two options whose results are stored in the table as 1 and 2. I have a Dcount calculation in the footer of the subform counting the 1's and 2's, but I am getting confused with the Dcount function. I can get the Dcount to count all the 1's and 2's in the table but not just the ones relating a particular building. I have tried several options two of which are below:
=DCount("[BuildingID]","tblARoom"," [Purpose]='1'")
=DCount("[BuildingID]","tblARoom","[BuildingID] = " & "me.[Purpose]='1'")
The first one doesnt give the results I need. The second option doesnt work at all. Can anyone help me?
I have an Option Group on a subform containing two options whose results are stored in the table as 1 and 2. I have a Dcount calculation in the footer of the subform counting the 1's and 2's, but I am getting confused with the Dcount function. I can get the Dcount to count all the 1's and 2's in the table but not just the ones relating a particular building. I have tried several options two of which are below:
=DCount("[BuildingID]","tblARoom"," [Purpose]='1'")
=DCount("[BuildingID]","tblARoom","[BuildingID] = " & "me.[Purpose]='1'")
The first one doesnt give the results I need. The second option doesnt work at all. Can anyone help me?