I can't figure out it what's the problem

Shafique

Board Regular
Joined
Nov 23, 2018
Messages
119
in a query i am trying to sum a numeric field value based two fields value combination criteria
before that i it working very well but with one field value
please tell me what is the right expression
 

Attachments

  • error.jpg
    error.jpg
    71.7 KB · Views: 10
Perhaps you missed post 5 or just didn't bother to study concatenation if you didn't understand the post.
(removed suggested expression as it is exactly the same as prior post).

NOTE - single double quotes ( " ) are ignored by the query expression service in Access. If I substitute values for your variables, that leaves your post 9 expression as
DSum("PAPERPRD","IMPPRD","REELCOLOR= 5 AND [REELGSM]= 6)
Not surrounding your text criteria with quotes is your issue. Data typing numbers as text is usually not a good idea.
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Put the criteria into a string variable and debug.print that variable.
When you get it correct, use that in the function.

Small steps, one at a time.
 
Upvote 0
Put the criteria into a string variable and debug.print that variable.
When you get it correct, use that in the function.

Small steps, one at a time.
it seems i have to learn a lot of things. By the grace of GOD i will do it.
actually i am trying to generate a query result that shows me the balance of a specific criteria.
i have unmatched results between two queries by using four fields matching with Is Null criteria as you can see in balanceqry.jpg
here i want another query result (as shown in balanceqry2.jpg) that shows me the balance of [SANDINGPRDQRY]![SNQTY]'s
because the unmatched query did not less the [GRADINGPRDQRY]![GRQTY]'s Quantity
how its possible?
 

Attachments

  • balanceqry.jpg
    balanceqry.jpg
    32.5 KB · Views: 4
  • balanceqry2.jpg
    balanceqry2.jpg
    36.1 KB · Views: 6
Upvote 0
Trying to help without having access to the database and data is a bit difficult.
Could you post some data samples from each of those two tables and show us your expected output (based on those data samples)?
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top