Dsum multiple criteria

irwan.dwise

New member
Local time
Today, 06:38
Joined
Nov 29, 2021
Messages
2
Hello my name Irwan from Indonesia, i have problem with with syntax, i try to make recapitulation of material for each contract, can anyone help, please.
Thanks and sorry if my english not good

Code:
DSum("Qty";"Detail Kontrak";" [Material]='Jointing Coldshrink Resin 300' And  [No Subkontrak]  =" & [Nomor Sub Pemesanan] & " ")

here i attach the screenshot of my databse relation
 

Attachments

  • Picture.JPG
    Picture.JPG
    126.4 KB · Views: 242
Welcome to the forums! We are the most active Microsoft Access community on the internet by far, with posts going back over 20 years!

To get started, I highly recommend you read the post below. It contains important information for all new users to this forum.

https://www.access-programmers.co.uk/forums/threads/new-member-read-me-first.223250/

We look forward to having you around here, learning stuff and having fun!
 
Hi. Welcome to AWF!

I'm not sure, but using spaces in your field names could be adding to the problem.
 
Last edited:
you have space on your table name/query so enclose it in square bracket:

"[Detail Kontrak]"
 
Any table or field name with double words spaced e.g detail kontrak should have an underscore between them.i.e detail_kontrak. Also @arnelgp suggestion should be applied
 
Welcome to AWF. I moved your thread to a more appropriate forum.
 
Code:
Expr1: DSum("Qty";"[Detail Kontrak]";"[Material]='Jointing Coldshrink Resin 300' And [No Subkontrak]  =" & [Nomor Sub Pemesanan] & " ")
As he told you (theDBguy) and (arnelgp) you have spaces and also the table name contains an underlined that must be in square brackets
 
Code:
Expr1: DSum("Qty";"[Detail Kontrak]";"[Material]='Jointing Coldshrink Resin 300' And [No Subkontrak]  =" & [Nomor Sub Pemesanan] & " ")
As he told you (theDBguy) and (arnelgp) you have spaces and also the table name contains an underlined that must be in square brackets
Names with underscores do not need to be surrounded by square brackets.?
They are normally there so as not to use square brackets?
 
Names with underscores do not need to be surrounded by square brackets.?
They are normally there so as not to use square brackets?
You are correct, I meant that he should not put a ruler (space)
 

Users who are viewing this thread

Back
Top Bottom