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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|