Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-12-2019, 03:13 AM   #1
wajidpharmacist007
Newly Registered User
 
Join Date: Nov 2018
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
wajidpharmacist007 is on a distinguished road
DSUM Function Criteria

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

wajidpharmacist007 is offline   Reply With Quote
Old 11-12-2019, 03:34 AM   #2
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,531
Thanks: 441
Thanked 843 Times in 814 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: DSUM Function Criteria

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
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
Old 11-12-2019, 07:46 AM   #3
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,567
Thanks: 58
Thanked 1,437 Times in 1,418 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: DSUM Function Criteria

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.

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DSum function ignoiring criteria in Access KSDavis Queries 8 09-18-2017 09:00 AM
DSum function gloryboat General 1 12-22-2012 11:22 AM
DSum function gloryboat General 1 12-19-2012 10:37 AM
Date criteria in DSum Function zibzaba Queries 1 06-04-2010 07:25 AM
Question DSum Function sinouye General 4 07-28-2008 03:48 PM




All times are GMT -8. The time now is 04:04 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World