as i add "&" the query result has been blankYou are missing the "&" before that highlighted word.
Please post the exact expression you are now using for the DSUM that is returning nothing.as i add "&" the query result has been blank
as you guide me beforePlease post the exact expression you are now using for the DSUM that is returning nothing.
Quite frankly, I would recommend against using DSUM, if possible. Most of the time, an Aggregate Query would work better.
BALANCE: DSum("PAPERPRD","IMPPRD","REELCOLOR=" & [REELCOLOR] & " AND [REELGSM]=" & [REELGSM])
the both fields [REELCOLOR] AND [REELGSM] contains numeric type data. but in table i set these fields Data Type as Short TextOK, you also have an extra & and " at the end of your statement and a misplaced one too.
Try:
VBA Code:BALANCE: DSum("PAPERPRD","IMPPRD","REELCOLOR=" & [REELCOLOR] & " AND [REELGSM]=" & [REELGSM])
However, there may be more to it than that, depending on your data type.
You are using two fields in this formula: REELCOLOR and REELGSM. What data types are these?
If they are string/text, they will need to be surrounded by single quotes.
Also, it seems very odd to me that your field names and variables have the exact same names (i.e. "REELCOLOR and [REELCOLOR]).
Are you sure that is correct?
Where do these values that you are plugging into this formula coming from?
BALANCE: DSum("PAPERPRD","IMPPRD","REELCOLOR='" & [REELCOLOR] & "' AND [REELGSM]='" & [REELGSM] & "'")