A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

date range sum in a report



 
 
Thread Tools Display Modes
  #1  
Old October 12th, 2007, 08:32 PM posted to microsoft.public.access.reports
Terri
external usenet poster
 
Posts: 291
Default date range sum in a report

i have a report that has many things going on..however,
i need to know what's wrong with this?

=DCount("[reviewmonth]","databaseqry","[reviewmonth] and [14a]='1' And
[Hospital] = '" & [Hospital] & "' And [auditdate]="Between ' & [Beginning
Date] &' AND '& [End Date]' ")

everything works but the dater range part
help, help !!

--
terri
  #2  
Old October 12th, 2007, 09:35 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default date range sum in a report

Almost everything is wrong :-(
First we don't know what you are attempting to count and if databaseqry is
the record source of your report.

What type of value is reviewmonth? Your expression seems to suggest it is
true/false.

Can we assume field 14a is text?

You also have an =Between that doesn't make sense. Values are either = or
between.

Can you clarify where this expression is located and if the records to
consider are the same as the report's record source?

--
Duane Hookom
Microsoft Access MVP


"terri" wrote:

i have a report that has many things going on..however,
i need to know what's wrong with this?

=DCount("[reviewmonth]","databaseqry","[reviewmonth] and [14a]='1' And
[Hospital] = '" & [Hospital] & "' And [auditdate]="Between ' & [Beginning
Date] &' AND '& [End Date]' ")

everything works but the dater range part
help, help !!

--
terri

  #3  
Old October 15th, 2007, 05:58 PM posted to microsoft.public.access.reports
Terri
external usenet poster
 
Posts: 291
Default date range sum in a report

ok i'll try.....sorry....new to this message board realm.

The formula is one cell on a report showing me the count of the field
[ReviewMonth] for a date range.

The report is not based on the "databaseqry" query,....the report itself is
based on another qry...(which is based on another table that holds all the
'fallouts' for a question) and this qry asks what hospital and what date
range.

so what i want to know is,
when i open the report, i will type in the hospital and the date range that
i want, and it will show me, in that cell, the count for that hospital and
date range.

it works in another report that's based on a query that asks only hospital
and month(i took out the month part for this)....but for this one when i try
to put in the 'between' part, it doesn't work.

so what i'm asking is.....how do i tell it to use the date range when
looking up the answer for this cell? I just can't get it to do the date range
part.
--
terri


"terri" wrote:

i have a report that has many things going on..however,
i need to know what's wrong with this?

=DCount("[reviewmonth]","databaseqry","[reviewmonth] and [14a]='1' And
[Hospital] = '" & [Hospital] & "' And [auditdate]="Between ' & [Beginning
Date] &' AND '& [End Date]' ")

everything works but the dater range part
help, help !!

--
terri

  #4  
Old October 15th, 2007, 07:32 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default date range sum in a report

Try this expression:

=DCount("[reviewmonth]","databaseqry","[14a]='1' And
[Hospital] = '" & [Hospital] & "' And [auditdate] Between #" & [Beginning
Date] & "# AND #" & [End Date] & "#")

--
Duane Hookom
Microsoft Access MVP


"terri" wrote:

ok i'll try.....sorry....new to this message board realm.

The formula is one cell on a report showing me the count of the field
[ReviewMonth] for a date range.

The report is not based on the "databaseqry" query,....the report itself is
based on another qry...(which is based on another table that holds all the
'fallouts' for a question) and this qry asks what hospital and what date
range.

so what i want to know is,
when i open the report, i will type in the hospital and the date range that
i want, and it will show me, in that cell, the count for that hospital and
date range.

it works in another report that's based on a query that asks only hospital
and month(i took out the month part for this)....but for this one when i try
to put in the 'between' part, it doesn't work.

so what i'm asking is.....how do i tell it to use the date range when
looking up the answer for this cell? I just can't get it to do the date range
part.
--
terri


"terri" wrote:

i have a report that has many things going on..however,
i need to know what's wrong with this?

=DCount("[reviewmonth]","databaseqry","[reviewmonth] and [14a]='1' And
[Hospital] = '" & [Hospital] & "' And [auditdate]="Between ' & [Beginning
Date] &' AND '& [End Date]' ")

everything works but the dater range part
help, help !!

--
terri

  #5  
Old October 16th, 2007, 01:40 PM posted to microsoft.public.access.reports
Terri
external usenet poster
 
Posts: 291
Default date range sum in a report

yes! you are wonderful!!! never thought of using the # signs......whew !!
thank you sooooo much
--
terri


"Duane Hookom" wrote:

Try this expression:

=DCount("[reviewmonth]","databaseqry","[14a]='1' And
[Hospital] = '" & [Hospital] & "' And [auditdate] Between #" & [Beginning
Date] & "# AND #" & [End Date] & "#")

--
Duane Hookom
Microsoft Access MVP


"terri" wrote:

ok i'll try.....sorry....new to this message board realm.

The formula is one cell on a report showing me the count of the field
[ReviewMonth] for a date range.

The report is not based on the "databaseqry" query,....the report itself is
based on another qry...(which is based on another table that holds all the
'fallouts' for a question) and this qry asks what hospital and what date
range.

so what i want to know is,
when i open the report, i will type in the hospital and the date range that
i want, and it will show me, in that cell, the count for that hospital and
date range.

it works in another report that's based on a query that asks only hospital
and month(i took out the month part for this)....but for this one when i try
to put in the 'between' part, it doesn't work.

so what i'm asking is.....how do i tell it to use the date range when
looking up the answer for this cell? I just can't get it to do the date range
part.
--
terri


"terri" wrote:

i have a report that has many things going on..however,
i need to know what's wrong with this?

=DCount("[reviewmonth]","databaseqry","[reviewmonth] and [14a]='1' And
[Hospital] = '" & [Hospital] & "' And [auditdate]="Between ' & [Beginning
Date] &' AND '& [End Date]' ")

everything works but the dater range part
help, help !!

--
terri

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.