View Single Post
  #4  
Old March 26th, 2010, 03:53 AM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Lame Report Requirements

The crosstab gives you a matrix:
- times on one axis
- staff on the other
- intersection point tells you whether the that person is on at that time.

-1 is the value in Access for True. (0 is false.)
Hence, if you get -1, the person is on at that time.
You may be able to format this field to show Yes instead of -1.
Or you can change the expression so it gives you a Yes.

That matrix is the simplest solution I can suggest for you.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"paradise95969 via AccessMonster.com" u57765@uwe wrote in message
news:a58c2e88096d1@uwe...
I couldn't get this to work. I ended up with a query result full of
"-1"...

May I re-ask- changing the parameters?

My CurrentRoster table now has fname, lname, in time, out time- with 24
staff
and an entire months worth of data...

Time entries are as such: (showing only part of the first day here)

In time Out time
2/1/2010 2/1/2010 8:00:00 AM
2/1/2010 1:00:00 AM 2/1/2010 9:00:00 AM
2/1/2010 5:00:00 AM 2/1/2010 9:00:00 AM
2/1/2010 7:00:00 AM 2/1/2010 3:15:00 PM
2/1/2010 7:00:00 AM 2/1/2010 2:45:00 PM
2/1/2010 8:15:00 AM 2/1/2010 4:15:00 PM (needs to counted as true for 8am)
2/1/2010 9:00:00 AM 2/1/2010 1:00:00 PM (8-830 is 8am- 831 true for 9am)
2/1/2010 9:30:00 AM 2/1/2010 7:00:00 PM
2/1/2010 12:00:00 PM 2/1/2010 8:00:00 PM
2/1/2010 12:00:00 PM 2/1/2010 2:30:00 PM
2/1/2010 12:00:00 PM 2/1/2010 8:00:00 PM
2/1/2010 2:00:00 PM 2/1/2010 10:00:00 PM
2/1/2010 2:00:00 PM 2/1/2010 10:00:00 PM
2/1/2010 2:30:00 PM 2/1/2010 8:30:00 PM
2/1/2010 3:45:00 PM 2/1/2010 11:00:00 PM
2/1/2010 4:15:00 PM 2/2/2010
2/1/2010 4:15:00 PM 2/2/2010
2/1/2010 5:00:00 PM 2/1/2010 9:45:00 PM
2/1/2010 8:30:00 PM 2/1/2010 10:30:00 PM

My report needs to show each hour of the day & number of staff on duty- as
such:

time # staff
2/1/2010 12am 1
1am 2
...
7am 5
8am 5
9am 4
10am 5
...
2/2/2010 ...


Thanks for your patience...

--
Message posted via http://www.accessmonster.com