473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Dsum problem

Hi

I'm trying to run a simple query using MS Access to give me the results
of some sales data during specific periods. The periods are in
increments of one month from when an item is made available (for
example if item A is made available on the 15th of December, I want to
know the total sales in the first month from the 15th of December to
the 14th January, and then the total sales in the second month 15th
January to 14th Februay).

I feel the best way to do this is using Dsum, but I'm having trouble
understanding how the function works. Having entered the criteria for
the first month I'm getting the same result for each record in the
query (I presume this is the total for all of the records in the
resulting query, whereas I want individual totals for each record
returned).

Does anyone know why this is? The value for total is currently set to
'Group By'.

Month1: DSum("[Buys]","[1st Month Buys - QueryDomain]","[Date] <
#15/01/2005#)
Why and when do you need to place fields in quotation marks?

Nov 13 '05 #1
1 1316
if you break the dates into groups in a single query (say quarters or
months), then you can use a totals query on that result and get what
you want. You'd just create a normal totals query and not use DSUM at
all.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rolan | last post by:
I'm using Access 97 and need some assistance in sorting out a proper DSum expression, or maybe even DCount might be an alternative. I have tried numerous combinations, but with no apparent success....
2
by: Dalan | last post by:
I seemed to be having problems with structuring the use of NZ with a DSum expression. Having tried numerous variations of the expression without success, I'm asking for assistance. First some...
1
by: Alex | last post by:
Acc 97 Hi, I have the following in my query which works well if it is all set to numbers on table design. But what I want to do is where it states MC (short for machine name) use the actual...
4
by: John Baker | last post by:
Hi: I have a form, and wish to show on the form the current total for a single field on a table. I have set this up thus: =DSum(,!) in an unbound text field. These are correct field and table...
3
by: Mark Reed | last post by:
All, I have never used this function before and am not sure it what I need. Just to clarify, I have a report based on a query which has amoungst other field, wk, parea & packs_req. What I am...
3
by: beppe005 | last post by:
I would like to calculate a total for all the field with the same in a query. I don't know how to set the "criteria" for this dsum function, it should be something like = but it doesn't make...
1
by: gbb0330 | last post by:
Hi All i am trying to calculate Quantity on hand in a unbound textbox in a form with a subform QonHand=Qreceived - TotalQSold TotalQsold=QsoldOnEbay+QsoldThruOtherChannels here is my...
33
by: potassium flower | last post by:
I am trying to create a food order system for a restaurant. I have tried using both the DSum and Sum functions to calculate the total cost of an order. The total cost is a textbox on the form...
1
by: danielgoss | last post by:
Hi I have a report that has loads of textboxes that calculate things based on the value on another textbox in the report. I have put a hidden textbox on my report that gets its value from an...
3
by: majapa | last post by:
To start, here is my DSum expression: Develop: Nz(DSum(". & "] + . & "]","CSO","='Ability to Develop'")*-1,0) I actually have 4 of these, each one with a different option for . For more context,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.