U
upandaway
The main form “frm_Days_At_Hospital†has two sub forms. All forms should show
data of the same date range (i.e. Admission Date from 03/01/06 till 03/19/06)
having the user to state the date range for the main form only and not for
the two sub forms individually also (In total thus three times).
First I checked all the appropriate answers in this discussion group and as
stated in several answers I tried with an unbound text field “StartDate†and
another unbound text field “EndDate†in the main form but in all those
answers to other programmers, I never found out, what to do next. Since those
fields are unbound nothing happens, when I enter the date
So, I am still stuck with my only known way to have the main form come up
with information between given Admission Date.
How to have the sub forms reply between the given date also?
SQL-Statement of the main form’s query:
SELECT [AD Absent Sick].[Admission Date], [AD Absent Sick].Discharged,
(DateDiff("d",[Admission Date],[Discharged])+1) AS DaysDischarged,
(DateDiff("d",[Discharged],Date())) AS DaysDischargedTillToday,
(DateDiff("d",[Admission Date],Date())+1) AS DaysAdmTillToday,
[DaysDischargedTillToday]+[DaysDischarged] AS Substract, [AD Absent
Sick].Clinic, [AD Absent Sick].[Admission Date] AS StartDate, [AD Absent
Sick].Discharged AS EndDate
FROM [AD Absent Sick]
WHERE ((([AD Absent Sick].[Admission Date]) Between [StartDate] And
[EndDate]));
SQL-Statement of one of the sub form’s query:
SELECT [AD Absent Sick].[Admission Date], [AD Absent Sick].Discharged, [AD
Absent Sick].Clinic, (DateDiff("d",[Admission Date],[Discharged])+1) AS
DaysDischarged, (DateDiff("d",[Discharged],Date())) AS
DaysDischargedTillToday, (DateDiff("d",[Admission Date],Date())+1) AS
DaysAdmTillToday, [DaysDischargedTillToday]+[DaysDischarged] AS Substract
FROM [AD Absent Sick]
WHERE ((([AD Absent Sick].Clinic)="BBG"));
This is my third posting, no answer received yet. Does it sound too stupid?
Regards Bernhard
data of the same date range (i.e. Admission Date from 03/01/06 till 03/19/06)
having the user to state the date range for the main form only and not for
the two sub forms individually also (In total thus three times).
First I checked all the appropriate answers in this discussion group and as
stated in several answers I tried with an unbound text field “StartDate†and
another unbound text field “EndDate†in the main form but in all those
answers to other programmers, I never found out, what to do next. Since those
fields are unbound nothing happens, when I enter the date
So, I am still stuck with my only known way to have the main form come up
with information between given Admission Date.
How to have the sub forms reply between the given date also?
SQL-Statement of the main form’s query:
SELECT [AD Absent Sick].[Admission Date], [AD Absent Sick].Discharged,
(DateDiff("d",[Admission Date],[Discharged])+1) AS DaysDischarged,
(DateDiff("d",[Discharged],Date())) AS DaysDischargedTillToday,
(DateDiff("d",[Admission Date],Date())+1) AS DaysAdmTillToday,
[DaysDischargedTillToday]+[DaysDischarged] AS Substract, [AD Absent
Sick].Clinic, [AD Absent Sick].[Admission Date] AS StartDate, [AD Absent
Sick].Discharged AS EndDate
FROM [AD Absent Sick]
WHERE ((([AD Absent Sick].[Admission Date]) Between [StartDate] And
[EndDate]));
SQL-Statement of one of the sub form’s query:
SELECT [AD Absent Sick].[Admission Date], [AD Absent Sick].Discharged, [AD
Absent Sick].Clinic, (DateDiff("d",[Admission Date],[Discharged])+1) AS
DaysDischarged, (DateDiff("d",[Discharged],Date())) AS
DaysDischargedTillToday, (DateDiff("d",[Admission Date],Date())+1) AS
DaysAdmTillToday, [DaysDischargedTillToday]+[DaysDischarged] AS Substract
FROM [AD Absent Sick]
WHERE ((([AD Absent Sick].Clinic)="BBG"));
This is my third posting, no answer received yet. Does it sound too stupid?
Regards Bernhard