W
wrldruler
Hello,
I've got a time card database. Our office uses 4 types of time
(Project, Admin, etc). I want to have a form that shows 4 sections --
one section for each type of time.
I have successfully built the query that contains summary data for all
time. No problem there.
Currently, I have 4 sub-forms on the main form -- one subform for each
type. On Form_Load, I bind the 4 subforms to the one query, with the
"Forecast_Work_Type_Code" field deciding which data goes in which
subform:
Me!subfrm_Forecast_Summary_User_NonCSD.Form.RecordSource =
"SELECT qry_Forecast_Summary_Indiv_f_Calc_All.* FROM
qry_Forecast_Summary_Indiv_f_Calc_All WHERE
(((qry_Forecast_Summary_Indiv_f_Calc_All.Forecast_Work_Type_Code)=1));"
Me!subfrm_Forecast_Summary_User_NonCSD.Form.RecordSource =
"SELECT qry_Forecast_Summary_Indiv_f_Calc_All.* FROM
qry_Forecast_Summary_Indiv_f_Calc_All WHERE
(((qry_Forecast_Summary_Indiv_f_Calc_All.Forecast_Work_Type_Code)=2));"
Me!subfrm_Forecast_Summary_User_RTE.Form.RecordSource =
"SELECT qry_Forecast_Summary_Indiv_f_Calc_All.* FROM
qry_Forecast_Summary_Indiv_f_Calc_All WHERE
(((qry_Forecast_Summary_Indiv_f_Calc_All.Forecast_Work_Type_Code)=3));"
Me!subfrm_Forecast_Summary_User_Admin.Form.RecordSource =
"SELECT qry_Forecast_Summary_Indiv_f_Calc_All.* FROM
qry_Forecast_Summary_Indiv_f_Calc_All WHERE
(((qry_Forecast_Summary_Indiv_f_Calc_All.Forecast_Work_Type_Code)=4));"
So 4 identical subforms, pointing to the same query, with just
Forecast_Work_Type_Code being different.
Here is my problem. The query takes 5 seconds to load, which is OK
with me. But every time I bind the query to the subform it takes 5
seconds per subform. 5 seconds x 4 subforms = 20 seconds to load.
Can you recommend a faster solution that will load the query one time
and then I can filter by Forecast_Work_Type_Code to produce my 4
different sections?
Thanks,
Chris
I've got a time card database. Our office uses 4 types of time
(Project, Admin, etc). I want to have a form that shows 4 sections --
one section for each type of time.
I have successfully built the query that contains summary data for all
time. No problem there.
Currently, I have 4 sub-forms on the main form -- one subform for each
type. On Form_Load, I bind the 4 subforms to the one query, with the
"Forecast_Work_Type_Code" field deciding which data goes in which
subform:
Me!subfrm_Forecast_Summary_User_NonCSD.Form.RecordSource =
"SELECT qry_Forecast_Summary_Indiv_f_Calc_All.* FROM
qry_Forecast_Summary_Indiv_f_Calc_All WHERE
(((qry_Forecast_Summary_Indiv_f_Calc_All.Forecast_Work_Type_Code)=1));"
Me!subfrm_Forecast_Summary_User_NonCSD.Form.RecordSource =
"SELECT qry_Forecast_Summary_Indiv_f_Calc_All.* FROM
qry_Forecast_Summary_Indiv_f_Calc_All WHERE
(((qry_Forecast_Summary_Indiv_f_Calc_All.Forecast_Work_Type_Code)=2));"
Me!subfrm_Forecast_Summary_User_RTE.Form.RecordSource =
"SELECT qry_Forecast_Summary_Indiv_f_Calc_All.* FROM
qry_Forecast_Summary_Indiv_f_Calc_All WHERE
(((qry_Forecast_Summary_Indiv_f_Calc_All.Forecast_Work_Type_Code)=3));"
Me!subfrm_Forecast_Summary_User_Admin.Form.RecordSource =
"SELECT qry_Forecast_Summary_Indiv_f_Calc_All.* FROM
qry_Forecast_Summary_Indiv_f_Calc_All WHERE
(((qry_Forecast_Summary_Indiv_f_Calc_All.Forecast_Work_Type_Code)=4));"
So 4 identical subforms, pointing to the same query, with just
Forecast_Work_Type_Code being different.
Here is my problem. The query takes 5 seconds to load, which is OK
with me. But every time I bind the query to the subform it takes 5
seconds per subform. 5 seconds x 4 subforms = 20 seconds to load.
Can you recommend a faster solution that will load the query one time
and then I can filter by Forecast_Work_Type_Code to produce my 4
different sections?
Thanks,
Chris