How to enter Start- and Enddate in a form with subforms once only

G

Guest

Hi out there!
I have one company, a main office and two subsidiaries. The subsidiaries are
working for them self.
Fields are: Date process started, Date process ends
Queries are to provide information on main office as well as the
subsidiaries: “Days between Start and End of Process†and “Days of not Ended
Process till Todayâ€.
Same information is required for each subsidiary individually also.
qryOverall_Information
qrySubsidiary_A
qrySubsidiary_B

The qryOverall_Information contains as “Criteria†in the Field “Date Process
started†the line â€Between [StartDate] And [EndDate]†After entering
StartDate and EndDate the query shows up with the Data in the given timeframe.
With the same Criteria in the qrySubsidiary_A and _B each individual Query
comes up with the required data also.

A form “frmUsed_and_Open Time†is created to show the Overall Information
(out of qryOverall_Information) and is working perfect, after entering the
StartDate and EndDate according to the appropriate msgBox.
However in this form two sub forms are integrated containing information of
both queries qrySubsidiary_A and qrySubsidiary_B.
When opening the form now it is necessary to enter StartDate and EndDate 3
times in order to get the correct numbers.
When omitting the Criteria in both subsidiary queries, only once the
StartDate and EndDate has to be entered but the subsidiaries information is
the total numbers and not the one for the requested time frame.

How will I be able to enter the timeframe once only but get from all the
forms the correct numbers?
Do I think too simple and do I have to program “Event Procedures†like “on
Focus†etc.?
Thank you for any help.
 
G

Guest

The critiera for the data column in all the queries should reference the same
data. I assume you have start and end dates on your main form and that is is
open. So it would be:
"#" & Forms!MyFormName.txtStartDate "#"
 
G

Guest

Well, thank you.
Actually I have the Start- and Enddate as Criteria on the query, where the
main form is coming from.
qryOverall_Information.
While calling the main Form, the Windows are coming up from the query and
the information for the whole action is coming up correct, only the sub forms
do not have the information in the required time frame.


Klatuu said:
The critiera for the data column in all the queries should reference the same
data. I assume you have start and end dates on your main form and that is is
open. So it would be:
"#" & Forms!MyFormName.txtStartDate "#"

bernie said:
Hi out there!
I have one company, a main office and two subsidiaries. The subsidiaries are
working for them self.
Fields are: Date process started, Date process ends
Queries are to provide information on main office as well as the
subsidiaries: “Days between Start and End of Process†and “Days of not Ended
Process till Todayâ€.
Same information is required for each subsidiary individually also.
qryOverall_Information
qrySubsidiary_A
qrySubsidiary_B

The qryOverall_Information contains as “Criteria†in the Field “Date Process
started†the line â€Between [StartDate] And [EndDate]†After entering
StartDate and EndDate the query shows up with the Data in the given timeframe.
With the same Criteria in the qrySubsidiary_A and _B each individual Query
comes up with the required data also.

A form “frmUsed_and_Open Time†is created to show the Overall Information
(out of qryOverall_Information) and is working perfect, after entering the
StartDate and EndDate according to the appropriate msgBox.
However in this form two sub forms are integrated containing information of
both queries qrySubsidiary_A and qrySubsidiary_B.
When opening the form now it is necessary to enter StartDate and EndDate 3
times in order to get the correct numbers.
When omitting the Criteria in both subsidiary queries, only once the
StartDate and EndDate has to be entered but the subsidiaries information is
the total numbers and not the one for the requested time frame.

How will I be able to enter the timeframe once only but get from all the
forms the correct numbers?
Do I think too simple and do I have to program “Event Procedures†like “on
Focus†etc.?
Thank you for any help.
 
G

Guest

I guess I am not understanding the problem. If you main form is open and you
are referencing the main form and control in the query criteria as I posted
earlier, it should pick up the value and not have to ask for the parameter.

bernie said:
Well, thank you.
Actually I have the Start- and Enddate as Criteria on the query, where the
main form is coming from.
qryOverall_Information.
While calling the main Form, the Windows are coming up from the query and
the information for the whole action is coming up correct, only the sub forms
do not have the information in the required time frame.


Klatuu said:
The critiera for the data column in all the queries should reference the same
data. I assume you have start and end dates on your main form and that is is
open. So it would be:
"#" & Forms!MyFormName.txtStartDate "#"

bernie said:
Hi out there!
I have one company, a main office and two subsidiaries. The subsidiaries are
working for them self.
Fields are: Date process started, Date process ends
Queries are to provide information on main office as well as the
subsidiaries: “Days between Start and End of Process†and “Days of not Ended
Process till Todayâ€.
Same information is required for each subsidiary individually also.
qryOverall_Information
qrySubsidiary_A
qrySubsidiary_B

The qryOverall_Information contains as “Criteria†in the Field “Date Process
started†the line â€Between [StartDate] And [EndDate]†After entering
StartDate and EndDate the query shows up with the Data in the given timeframe.
With the same Criteria in the qrySubsidiary_A and _B each individual Query
comes up with the required data also.

A form “frmUsed_and_Open Time†is created to show the Overall Information
(out of qryOverall_Information) and is working perfect, after entering the
StartDate and EndDate according to the appropriate msgBox.
However in this form two sub forms are integrated containing information of
both queries qrySubsidiary_A and qrySubsidiary_B.
When opening the form now it is necessary to enter StartDate and EndDate 3
times in order to get the correct numbers.
When omitting the Criteria in both subsidiary queries, only once the
StartDate and EndDate has to be entered but the subsidiaries information is
the total numbers and not the one for the requested time frame.

How will I be able to enter the timeframe once only but get from all the
forms the correct numbers?
Do I think too simple and do I have to program “Event Procedures†like “on
Focus†etc.?
Thank you for any help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top