DSUM Function Criteria

Local time
Today, 04:50
Joined
Nov 23, 2018
Messages
31
I am new to access and have small inventory database in which i have two queries category wise consumption having fields ID, Item, and Category and other query Pending Purchase Requisition Query having fields ID, Item, PR Date, PR QTY, and GRN No.
I want to sum PR Qty of each item present in Purchase requisition Query for one month in report.
Formula that i am using is =Dsum("[PR Qty]","[Purchase Requisition Query]","[PR Date]>#08/01/2019# and [PR Date]<#08/31/2019# and [ID] = " & [ID])
When i run the query resulted fields are blank PR Qty is not summed up
Kindly guide
 
Put your criteris into a string variable and then debug.print that to get it correct
Code:
strwhere = "[Date] >#08/01/2018# and [Date] <#08/31/2018# AND ID > " & tt
? dsum("Amount","Transactions",strwhere)

HTH
 
When you get this to work, your query might run very slow. There may be another way to get what you want, but we'll probably need to know more about your database to offer an alternative.
 

Users who are viewing this thread

Back
Top Bottom