Sniper-BoOyA-
Registered User.
- Local time
- Today, 12:28
- Joined
- Jun 15, 2010
- Messages
- 204
Good Morning,
I am working on a form which is a continuous form atm. Up to this point things are going allright, but now ive come across something that i am struggling with.
First of all, ill show you the query used for this form :
Ok, where were we.
Ermm..
As you can see the monsternr (sample numbers) are found in the table "labgegevens". Which prevents the user from changing or adding any of em.
So far so good,
Here's the thing. I want to calculate the everage of the value of "watergeh", " D7" and " D28"
So far so good. But here comes the tricky part.
When it comes to "watergeh" i need the average of Sample number 1 and 3, 4 and 6 and 7 and 9.
And when it comes to D7 and D28 i need the average of Sample number 1 2 3, 4 5 6 and 7 8 9.
Ive been trying to get it to work somehow, but no luck yet. Do you have any ideas?
Edit : I have added a " id" field to the table, to have at least one static reference point when it comes to filtering data. If i come across the solution, ill let you know.
Cheers!
I am working on a form which is a continuous form atm. Up to this point things are going allright, but now ive come across something that i am struggling with.
First of all, ill show you the query used for this form :
Code:
SELECT querywatergehalte.tbllabgegevens.monsternr, tblstabilisatiecilinders.*, querywatergehalte.watergeh, (([massa]/100+[watergeh])*100)/[opvinh] AS drgdchthd, tblopv.opvgew, tblopv.opvinh, ([totaaldruk]/[opvgew])*1000 AS d7, ([totaaldruk]/[opvgew])*1000 AS d8
FROM (tblstabilisatiecilinders RIGHT JOIN querywatergehalte ON tblstabilisatiecilinders.monsternr = querywatergehalte.tbllabgegevens.monsternr) LEFT JOIN tblopv ON tblstabilisatiecilinders.opvnr = tblopv.opvnr;
Ok, where were we.
Ermm..
As you can see the monsternr (sample numbers) are found in the table "labgegevens". Which prevents the user from changing or adding any of em.
So far so good,
Here's the thing. I want to calculate the everage of the value of "watergeh", " D7" and " D28"
So far so good. But here comes the tricky part.
When it comes to "watergeh" i need the average of Sample number 1 and 3, 4 and 6 and 7 and 9.
And when it comes to D7 and D28 i need the average of Sample number 1 2 3, 4 5 6 and 7 8 9.
Ive been trying to get it to work somehow, but no luck yet. Do you have any ideas?
Edit : I have added a " id" field to the table, to have at least one static reference point when it comes to filtering data. If i come across the solution, ill let you know.
Cheers!