Sum of queries

endri81

Registered User.
Local time
Today, 06:00
Joined
Jul 5, 2010
Messages
121
Hi.I got a table with columns like that:
1.first column-year of abortion for the first time (2006,2008 etc)
2.second column-end of pregnancy for the first time (1,2,3,4)
1 is spontaneously,2 is interruption,3 is birth alive,4 birth dead

3.third column-year of abortion for the second time (2006,2008 etc)
4.fourth column-end of pregnancy for the second time (1,2,3,4)
...........................
Columns are repeated like this upon to 8 times.
I need a report for giving total of aborts every year from 1990-2009
Any ideas?
 
Is 1 record for one person and it could show up to 8 occurrences in the one record?
And if so, each occurrence has a date?

If this is the case and you want to use a query, then one way is to have multiple queries (8) that check each of the eight occurrences and their respective dates.

The first query will make a temp table and the following 7 will append data to this table.

A nine query will provide your report data from the temp table.

Each of the 8 queries will add records showing the PatientID (if required), Date (if required) and 1 being the Occurrence.

The report can group the data by Patient and or Date and supply detailed or just totals.

You can do this with VBA and if anyone explains how to do this, I will be watching as I have a similar situation where I collected all the data (telephone numbers) and used a heap of queries.
 

Users who are viewing this thread

Back
Top Bottom