Dsum Date Range

G

Guest

=DSum([Allocate1],[In By Day] Between [Text454] And [Text455])

I want the sum of [allocate1] by date, in the specified dates ranging
[Text454] through the date [Text455]. My equation doesn't work, how can I
get it to total?
 
G

Guest

Try this
=DSum([Allocate1],[In By Day] >#" & [Text454] & "# And [In By Day] <= #" &
[Text455] & "#")
 
D

Duane Hookom

Change the names of Text454 and Text455 to something like: txtStart and
txtEnd.

Then, tell us something about your "domain". Where can we find [Allocate1]
and [In By Day]? Are they found in your report's record source?

Are Text454 and Text455 controls on your report?
 
G

Guest

I am not sure if a Dsum is correct, perhaps even a sum would work. Text454
and Text455 are equations that I have created to determine a specific length
of time. Allocate1 is located in a In Detail section by Date Header. I am
inputting this information at the footer of the report. [In by Day] is the
field that shows each date. What is the advantage of renaming the fields?
Text454 and Text455 are not controls on the report.

=IIF([In by Day] is Between [Text454] AND [Text455], sum([Allocate1]),)

I'm looking for something like this that will actually add up the range,
however am not quite finding a solution. Thanks.

Duane Hookom said:
Change the names of Text454 and Text455 to something like: txtStart and
txtEnd.

Then, tell us something about your "domain". Where can we find [Allocate1]
and [In By Day]? Are they found in your report's record source?

Are Text454 and Text455 controls on your report?

--
Duane Hookom
MS Access MVP
--

dogpigfish said:
=DSum([Allocate1],[In By Day] Between [Text454] And [Text455])

I want the sum of [allocate1] by date, in the specified dates ranging
[Text454] through the date [Text455]. My equation doesn't work, how can I
get it to total?
 
D

Duane Hookom

"What is the advantage of renaming the fields?" maintainability? naming
conventions? look professional?

You can try:
=Sum( Abs([In By Day] Between txtBetterName1 And txtBetterName2) *
[Allocate1])

--
Duane Hookom
MS Access MVP


dogpigfish said:
I am not sure if a Dsum is correct, perhaps even a sum would work. Text454
and Text455 are equations that I have created to determine a specific
length
of time. Allocate1 is located in a In Detail section by Date Header. I
am
inputting this information at the footer of the report. [In by Day] is
the
field that shows each date. What is the advantage of renaming the fields?
Text454 and Text455 are not controls on the report.

=IIF([In by Day] is Between [Text454] AND [Text455], sum([Allocate1]),)

I'm looking for something like this that will actually add up the range,
however am not quite finding a solution. Thanks.

Duane Hookom said:
Change the names of Text454 and Text455 to something like: txtStart and
txtEnd.

Then, tell us something about your "domain". Where can we find
[Allocate1]
and [In By Day]? Are they found in your report's record source?

Are Text454 and Text455 controls on your report?

--
Duane Hookom
MS Access MVP
--

dogpigfish said:
=DSum([Allocate1],[In By Day] Between [Text454] And [Text455])

I want the sum of [allocate1] by date, in the specified dates ranging
[Text454] through the date [Text455]. My equation doesn't work, how
can I
get it to total?
 
G

Guest

I'm not sure why it isn't working. Oh well, I'll try something completely
different. Thanks once again for the help.

Duane Hookom said:
"What is the advantage of renaming the fields?" maintainability? naming
conventions? look professional?

You can try:
=Sum( Abs([In By Day] Between txtBetterName1 And txtBetterName2) *
[Allocate1])

--
Duane Hookom
MS Access MVP


dogpigfish said:
I am not sure if a Dsum is correct, perhaps even a sum would work. Text454
and Text455 are equations that I have created to determine a specific
length
of time. Allocate1 is located in a In Detail section by Date Header. I
am
inputting this information at the footer of the report. [In by Day] is
the
field that shows each date. What is the advantage of renaming the fields?
Text454 and Text455 are not controls on the report.

=IIF([In by Day] is Between [Text454] AND [Text455], sum([Allocate1]),)

I'm looking for something like this that will actually add up the range,
however am not quite finding a solution. Thanks.

Duane Hookom said:
Change the names of Text454 and Text455 to something like: txtStart and
txtEnd.

Then, tell us something about your "domain". Where can we find
[Allocate1]
and [In By Day]? Are they found in your report's record source?

Are Text454 and Text455 controls on your report?

--
Duane Hookom
MS Access MVP
--

=DSum([Allocate1],[In By Day] Between [Text454] And [Text455])

I want the sum of [allocate1] by date, in the specified dates ranging
[Text454] through the date [Text455]. My equation doesn't work, how
can I
get it to total?
 
G

Guest

Got it to work, not sure why it wasn't working before. I used this:
=IIf(([Text479] Between [Text454] And [Text455]),Sum([Allocate1]))
Instead of using the control [In by day] I used a Text box that was set to
=[In by Day], which I named text479. Thanks for pointing me in the right
direction.

Duane Hookom said:
"What is the advantage of renaming the fields?" maintainability? naming
conventions? look professional?

You can try:
=Sum( Abs([In By Day] Between txtBetterName1 And txtBetterName2) *
[Allocate1])

--
Duane Hookom
MS Access MVP


dogpigfish said:
I am not sure if a Dsum is correct, perhaps even a sum would work. Text454
and Text455 are equations that I have created to determine a specific
length
of time. Allocate1 is located in a In Detail section by Date Header. I
am
inputting this information at the footer of the report. [In by Day] is
the
field that shows each date. What is the advantage of renaming the fields?
Text454 and Text455 are not controls on the report.

=IIF([In by Day] is Between [Text454] AND [Text455], sum([Allocate1]),)

I'm looking for something like this that will actually add up the range,
however am not quite finding a solution. Thanks.

Duane Hookom said:
Change the names of Text454 and Text455 to something like: txtStart and
txtEnd.

Then, tell us something about your "domain". Where can we find
[Allocate1]
and [In By Day]? Are they found in your report's record source?

Are Text454 and Text455 controls on your report?

--
Duane Hookom
MS Access MVP
--

=DSum([Allocate1],[In By Day] Between [Text454] And [Text455])

I want the sum of [allocate1] by date, in the specified dates ranging
[Text454] through the date [Text455]. My equation doesn't work, how
can I
get it to total?
 
D

Duane Hookom

If that expression proves to be reliable I really misunderstood your
question.

--
Duane Hookom
MS Access MVP
--

dogpigfish said:
Got it to work, not sure why it wasn't working before. I used this:
=IIf(([Text479] Between [Text454] And [Text455]),Sum([Allocate1]))
Instead of using the control [In by day] I used a Text box that was set to
=[In by Day], which I named text479. Thanks for pointing me in the right
direction.

Duane Hookom said:
"What is the advantage of renaming the fields?" maintainability? naming
conventions? look professional?

You can try:
=Sum( Abs([In By Day] Between txtBetterName1 And txtBetterName2) *
[Allocate1])

--
Duane Hookom
MS Access MVP


dogpigfish said:
I am not sure if a Dsum is correct, perhaps even a sum would work.
Text454
and Text455 are equations that I have created to determine a specific
length
of time. Allocate1 is located in a In Detail section by Date Header.
I
am
inputting this information at the footer of the report. [In by Day] is
the
field that shows each date. What is the advantage of renaming the
fields?
Text454 and Text455 are not controls on the report.

=IIF([In by Day] is Between [Text454] AND [Text455], sum([Allocate1]),)

I'm looking for something like this that will actually add up the
range,
however am not quite finding a solution. Thanks.

:

Change the names of Text454 and Text455 to something like: txtStart
and
txtEnd.

Then, tell us something about your "domain". Where can we find
[Allocate1]
and [In By Day]? Are they found in your report's record source?

Are Text454 and Text455 controls on your report?

--
Duane Hookom
MS Access MVP
--

=DSum([Allocate1],[In By Day] Between [Text454] And [Text455])

I want the sum of [allocate1] by date, in the specified dates
ranging
[Text454] through the date [Text455]. My equation doesn't work, how
can I
get it to total?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top