- Joined
- May 9, 2007
- Messages
- 1
- Reaction score
- 0
Dear friends,
I am trying to use DSUM function however, whenever I am running following query, I am receiving an error message "data type mismatch in criteria expression". Rest_code is a text field with lookup value from another table.
Query is:
SELECT a.*, DSum("net_sales","SHIRISH_MIS_EXCEL_DSR_QUERY1", "rest_code= " & rest_code & " and dsr_date <= " & dsr_date ) AS Expr1
FROM SHIRISH_MIS_EXCEL_DSR_QUERY1 AS a;
If "rest_code like" is used then it returns blank result. The rest_code+dsr_date is unique in the table.
Request you to help me please.
Shirish
I am trying to use DSUM function however, whenever I am running following query, I am receiving an error message "data type mismatch in criteria expression". Rest_code is a text field with lookup value from another table.
Query is:
SELECT a.*, DSum("net_sales","SHIRISH_MIS_EXCEL_DSR_QUERY1", "rest_code= " & rest_code & " and dsr_date <= " & dsr_date ) AS Expr1
FROM SHIRISH_MIS_EXCEL_DSR_QUERY1 AS a;
If "rest_code like" is used then it returns blank result. The rest_code+dsr_date is unique in the table.
Request you to help me please.
Shirish