A
anil
hi all
I have around 30 queries for one particular report due to each
parameter having different formula and format.I will try to explain and
needs advice and help if it will be better to convert it into code and
in which way.
first is parameterized query which is based on many tables and gets
'Date' from the form and other filters such as type = 'R' and model.
In next query it filters for required 9 parameters and formats as per
in full format(thm in trihalomethanes).
then I have to get 3 queries for EACH parameter as requires total
Results,Number of pass results ,Number of fail results.% results passed
- for each monthly and yearly results .
Some queries are also using the few functions e.g. 95% percentile
,stddev , which is written in code.
In yearly results I need the results for last 1 year and also calculate
total Results,Number of pass results ,Number of fail results.% results
passed.
Then the another problem is each parameter has to be expressed in
different decimal place format as parameter 1& 4 in 3 decimal
places,parameter 2 in 1 decimal places and remaining in 2 decimal
places.
I have made union query in last to combine all the parameters fro
monthly and yearly results.
In VBA I have done DAO code to get parameterized query as recordset and
then filter it.But i don't know how to get each recordset for
particular formula for each parameter and decimal places like the query
for group by and max,min or count.
e.g " select A,B,---Count(R)max(X),format(min(Z),"0.00") from query P ;
Since some of these queries also become the base for other queries
like general board results etc,so I am in doubt of moving towards code
but 30 queries are driving me crazy.
I hope I have explained properly
thanks
anil
I have around 30 queries for one particular report due to each
parameter having different formula and format.I will try to explain and
needs advice and help if it will be better to convert it into code and
in which way.
first is parameterized query which is based on many tables and gets
'Date' from the form and other filters such as type = 'R' and model.
In next query it filters for required 9 parameters and formats as per
in full format(thm in trihalomethanes).
then I have to get 3 queries for EACH parameter as requires total
Results,Number of pass results ,Number of fail results.% results passed
- for each monthly and yearly results .
Some queries are also using the few functions e.g. 95% percentile
,stddev , which is written in code.
In yearly results I need the results for last 1 year and also calculate
total Results,Number of pass results ,Number of fail results.% results
passed.
Then the another problem is each parameter has to be expressed in
different decimal place format as parameter 1& 4 in 3 decimal
places,parameter 2 in 1 decimal places and remaining in 2 decimal
places.
I have made union query in last to combine all the parameters fro
monthly and yearly results.
In VBA I have done DAO code to get parameterized query as recordset and
then filter it.But i don't know how to get each recordset for
particular formula for each parameter and decimal places like the query
for group by and max,min or count.
e.g " select A,B,---Count(R)max(X),format(min(Z),"0.00") from query P ;
Since some of these queries also become the base for other queries
like general board results etc,so I am in doubt of moving towards code
but 30 queries are driving me crazy.
I hope I have explained properly
thanks
anil