If you need further assistance, you might want to reply with the
significant table and field names from your application.
--
Duane Hookom
MS Access MVP
Oh sorry, I'm fine with that. Never made one but more than willing to
try.
OMS
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
How about a reply regarding my statement "If you want columns to be
Row Headings, you might need to create a union query"?
A union query can normalize an un-normalized table structure so that
it can be more flexibly reported.
--
Duane Hookom
MS Access MVP
HI DH,
Format(Format(Transaction_Date,"0000-00-00"),"mmmm") worked. Thanks.
Yes, TIME_INTERVAL_xx come from a table. All it does is count an
instance of a service. That's why I was adding 6 T_Intervals to get 3
hour periods.
OMS
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
To get the month name, consider getting the month name with:
Format( datevalue(Format(Transaction_Date,"0000-00-00")),"mmmm")
or
Format(Format(Transaction_Date,"0000-00-00"),"mmmm")
If you want columns to be Row Headings, you might need to create a
union query.
Do you have a table with fields like TIME_INTERVAL15,
TIME_INTERVAL16, TIME_INTERVAL16,...?
--
Duane Hookom
MS Access MVP
TRANSACTION_DATE is text like 20050930
Format(Transaction_Date,"mmmm") gave me Overflow error
Expr1, Expr2,... are sums of TIME_INTERVALS (1/2 hour each) hence
0700-1000 (7am-10am)
Expr1:
[TIME_INTERVAL15]+[TIME_INTERVAL16]+[TIME_INTERVAL17]+[TIME_INTERVAL18]+[TIME_INTERVAL19]+[TIME_INTERVAL20]
Expr1 data is in number form ie. 13
Remember I want Expr1, Expr2... to be values in the crosstab query
Example: April May June
0700-1000 6 1 3
1000-1300 5 4 7
1300-1600 3 4 2
Example: April May June
[Expr1Total] 6 1 3
[Expr2Total] 5 4 7
[Expr3Total] 3 4 2
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message
Is your TRANSACTION_DATE a date/time field or is it text. When you
use Mid(), it suggests text. You shouldn't need a big, ugly
Switch() function. Try use Format(Transaction_Date,"mmmm").
What does your actual data look like? What exactly are Expr1,
Expr2,...?
--
Duane Hookom
MS Access MVP
Thanks but that didn't answer the question. By the way this is
what I'm using for the date. I'm converting from numeric.
Month:
Expr7:
Switch(Mid([TRANSACTION_DATE],5,2)="01","January",Mid([TRANSACTION_DATE],5,2)="02","February",Mid([TRANSACTION_DATE],5,2)="03","March",Mid([TRANSACTION_DATE],5,2)="04","April",Mid([TRANSACTION_DATE],5,2)="05","May",Mid([TRANSACTION_DATE],5,2)="06","June",Mid([TRANSACTION_DATE],5,2)="07","July",Mid([TRANSACTION_DATE],5,2)="08","August",Mid([TRANSACTION_DATE],5,2)="09","September",Mid([TRANSACTION_DATE],5,2)="10","October",Mid([TRANSACTION_DATE],5,2)="11","November",Mid([TRANSACTION_DATE],5,2)="12","December")
See Duane Hookom's article "Dynamic Monthly Crosstab Report"
http://www.access.hookom.net/DynamicMthlyCrosstabRpt.htm
--
Jeff C
Live Well .. Be Happy In All You Do
:
Hi,
I am trying to make a query where columns are months and rows
are periods of
time during the day. Expr1,2,3, etc. are table column headers
with that data
I want. My problem is how do I get the value to properly
populate their
respective fields?
I am using Expression:
Switch([Expr1],"0700-1000",[Expr2],"1000-1300",[Expr3],"1300-1600",[Expr4],"1600-1900",[Expr5],"1900-2200",[Expr6],"2200-0100")
Example: April May June
0700-1000 6 1 3
1000-1300 5 4 7
1300-1600 3 4 2
Hope you can help. Thanks.