Hammy
08-30-2004, 12:23 PM
I am trying to create a report for attendance, I want to have it in table format, with the date of each service (from query) accross the top, then an 'x' in the corresponding cell if the person was there.
I don't know how to pull my query information (the service dates) and dispaly them horizontally as column heads.
i.e.
Name Sep7 Sep14 Sep21
-----------------------------------------------------------
Fred x x
Joe x x
Can anyone point me in how to do this?
Thanks,
Hammy
sha7jpm
08-31-2004, 03:57 AM
hi,
I know of a way to do this, will hunt out the code and post it for you..
if I have read your posting correctly,
you are basically turning a table/query on its head with the data becoming the columns...
it is quite tricky within access and as far as I know when I and a colleague wrote this we could not find any other examples of this being done, but there may be a simpler way to do it (99.99% of this forum is better at access than me!)... but I will post what I have and you can give that a go..
will post back asap.
John
Hammy
08-31-2004, 03:01 PM
I would really like to see your approach to this!
You basically get what I am after, however not 100% I think...
The data will become some of the columns, yes. Name, Address, etc will also be column heads but static...only the dates will be dynamic data column heads. Al the information below the column heads will also be data driven (obviously, that part is easy to do, it's outputting the date column heads that I am stuck on).
Hammy
greaseman
09-01-2004, 06:22 AM
Hammy,
If you go to Microsoft's web site, there are three articles in their Knowledge Base that might give you some ideas and help. The three articles are listed under the caption, "How To Transpose Data in a Table or Query". The article numbers are:
For Access 2002 : 202176
For Access 2000 : 283875
For Access 97 : 182822
I confess I've not had to work on something like this, but thought I'd offer a possible source of ideas. Good luck!