I entered the information in the SQL view. It creates the query for me
but
when trying to view the info I get this.
Expr1 MthNum MthName Cases DATE ASSIGNED
HEADQUARTERS 3 March 1 03/26/2005
HEADQUARTERS 3 March 29 03/29/2005
HEADQUARTERS 4 April 1 04/12/2005
HEADQUARTERS 4 April 1 04/14/2005
HEADQUARTERS 4 April 3 04/19/2005
HEADQUATERS 3 March 1 03/29/2005
sub 1 1 January 14 01/19/2005
sub 1 1 January 1 01/20/2005
sub 1 3 March 1 03/24/2005
sub 1 3 March 1 03/29/2005
sub 1 4 April 1 04/12/2005
sub 2 2 February 14 02/07/2005
sub 2 4 April 1 04/01/2005
sub 2 4 April 1 04/12/2005
sub 3 1 January 1 01/20/2005
sub 3 3 March 20 03/24/2005
sub 3 4 April 1 04/01/2005
sub 3 4 April 3 04/12/2005
sub 3 4 April 2 04/19/2005
sub 3 3 March 1 03/24/2005
I entered a Field to ask me for a date range when viewing the information
and it works great. Now I just need ot have the Totals for the month all
in
one entry. How do I change the SQL?
Thanks
When trying to enter Select[Assigned To], Month([Date Assigned]) as
MthNum,
Format([Date Assigned],"mmmm") as MthName, Count(*) as Cases I get an
error message that states The wyntax of the subquery in this expression
is
incorrect. Check the subquery's syntax and enclose the subquery in
parentheses. When I click ok it takes me to the word Select. Did I miss
something?
:
Select [Assigned To], Month([Date Assigned]) as MthNum,
Format([Date Assigned],"mmmm") as MthName, Count(*) as Cases
FROM Registration
GROUP BY [Assigned To], Month([Date Assigned]),
Format([Date Assigned],"mmmm");
Use the above query as the Record Source for your report.
--
Duane Hookom
MS Access MVP
--
I am looking for the following look in the report
Total Cases 10
assigned to HQ 3
January 1
Feb 1
March 1
Assigned to Other Station 4
January 2
April 2
Assigned to Third Station 18
January 15
March 3
In the query I that the report is based on:
Field: Assigned to
Table: Registration
Show is marked.
the Field: Assigned to is a drop down box that the person doing the
data
entry can choose the location that the case is assigned to.
Field: Date Assigned
Table: Registration
Show is marked.
the Field Date Assigned is a short date format.
The query that the report is based on Pulls the following:
LAST NAME FIRST NAME MIDDLE NAME
ADDRESS CITY COUNTY ZIP
ORI ASSIGNED TO DATE ASSIGNED REASSIGNED TO
DATE REASSIGNED TO DET CASE STATUS
I only need to have the assigned to (sorted by sub with totals for
each
month)
Reassigned to(sorted by name with totals for each month).
The rest of the information is not necessary for this report.
Thanks for all of your help. I really appreciate it.
:
Maybe you need to provide some sample records and desired display in
your
report...
--
Duane Hookom
MS Access MVP
--
When I am creating this totals query I have Field as Assigned to,
table
as
Registrants, Total as Group By, and in the Criteria I have put
([assigned
to]="Headquarters"). I then repeat this for the next sub. When I
view
the
Datasheet there is no information pulled. Should I be using
Expression
in
the Totals section?
:
It seems that you could create a totals query that groups by
AssignedTo
and
Format([Date Assigned],"yyyymm"). Then use this query as the
record
source
for a subreport.
--
Duane Hookom
MS Access MVP
--
I have a report that runs from a query. .
I have used this to sort by sub stations and give me a total
for
each
sub
and it works great.
=Abs(Sum([assigned to]="Headquarters"))
Now I need to have how many cases were assigned to each sub
station
in
Jan,
Feb, March etc...I do have a field in the query that would
allow for
this
it
is called Date Assigned. I just cannot seem to get the code
right.
Should I
use Between or IIF. Any Suggestions would be wonderful...