I am trying to calculate sales of agents seperately in the database. For total sales the DSUM is working fine. But if i try to bound it to some criteria (specific aget name) it gives ?NAME? error. Here is my code i applied for value selected from combobox
and here the code for textbox value criteria
Code:
=DSum("[totalsales]","MainTable","[Agent_Name]='" & me.cbo1 & "'")
and here the code for textbox value criteria
Code:
=DSum("[totalsales]","MainTable","[Agent_Name]='" & me.filteragent & "'")