I am trying to work out a few figures using my data. When I run my query I get my numbers back, but I do not think they are right. When I run a select query I get different results. I think ite because my query is adding on records rather than taking them away. What I want to happen is;
To find all accounts under a specific account type
Out of these accounts I only want accounts that are of a certain status
And then out of the reults of both of the above I only want to see accounts from a certain Location. (or in one case only in a certain location and in a certain LOB.
Can anyone help??
Sum(IIf(tbl_MIS_Records.[Account Type] In ("RegularAC","TopAC") And tbl_MIS_Records.Status In ("Approved","Not Approved","Mail Sent to requestor") And tbl_MIS_Records.Location In ("Moscow","Istanbul") Or ([Location]="Johannesburg" And [LOB]="Accounting"),1,0)) AS Result