Senin, 17 November 2014

[MS_AccessPros] Dcount Function

 

I need help with my query. I will simplify the table called 'Test' its based on as follows. Med1 through Med6 being fields.


Record No     Med1   Med2  Med3   Med4  Med5   Med6
001                      2          2          4          3           3          5
002                      3          3          3          4           4          4     

When I tried to create a calculated control to return the count of 4 in each row, I got 3 for record 1 and 3 for record 2 . The correct answer is 1 for record 1 and 3 for record 2.

The expression I used is shown below. Please assist as I do not know what I am doing wrong.

Expr1: DCount("[Median5]","Test","[Median5] = '4'")+DCount("[Median4]","Test","[Median4]='4'")+DCount("[Median6]","Test","[Median6]='4'")
 

Thanks

Ade

__._,_.___

Posted by: Adeboyejo Oyenuga <aoye_99@yahoo.co.uk>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar