my database looks like this
Event Date Time Slot Reception Hall Quidi Vidi Room Gibbett Hill Room
01/11/2005 3 No Yes No No No
04/11/2005 1 Yes No No No No
04/11/2005 1 No No No Yes No
17/11/2005 2 No No No Yes Yes
18/11/2005 3 No No No Yes Yes
19/11/2005 3 No No No No Yes
22/11/2005 3 No No No No Yes
I want to know how many times the Reception Hall, Quid Vidi, etc. used
in
each month.
I'm unsure how to do this in the query.
Thank you for your help.
:
You should first normalize your data with a union query:
SELECT [Event Date] As EventDate, "RH" as Room
FROM [have 6 colums]
WHERE RH = True
UNION ALL
SELECT [Event Date], "QV"
FROM [have 6 colums]
WHERE QV = True
UNION ALL
SELECT [Event Date], "GH"
FROM [have 6 colums]
WHERE GH = True
UNION ALL
SELECT [Event Date], "Aud"
FROM [have 6 colums]
WHERE Aud = True
UNION ALL
SELECT [Event Date], "QVGH"
FROM [have 6 colums]
WHERE QVGH = True;
You can then create a totals query that groups by Year(EventDate),
Month(EventDate), and Room while counting Room.
Long term, you should consider changing your table structure.
--
Duane Hookom
MS Access MVP
--
"Melissa needing help!!"
<
[email protected]>
wrote in message
I have 6 colums. Event Date/RH/QV/GH/Aud/QVGH.
Each one is a room rental, with a yes/no answer. I want to know how
many
times a month do each room be rented. what would my formula be for
this
query?
Thank You.