R
Rhonda Fischer
Hello,
I want to pass WHERE parameters, date values,
to the continuous subform of a parent form
called frmIncidentPerDepot. However I notice that
the filter of the parent form
receives these date values while the subform does not.
How do I pass the WHERE parameters to the subform?
As the parent form is just a background form.
Thank you kindly
Rhonda
==========================================================
Code calls parent form from Criteria Form:
==========================================================
TRIED: Unsuccessful can't find form called
----------------------------------------------------------
DoCmd.OpenForm "Forms!frmReportIncidentPerDepotAll!
frmReportIncidentPerDepotAllSub", , , "IncidentDate >= #"
& Format(Me!txtDateFrom, "yyyy-mm-dd") & "# AND
IncidentDate <= #" & Format(Me!txtDateTo, "yyyy-mm-dd")
& "# AND AccDangerousOcc = 1"
----------------------------------------------------------
THIS WORKS BUT DOESN'T SEND DATE RANGE TO SUBFORM
DoCmd.OpenForm "frmReportIncidentPerDepotAll", , , "Inciden
tDate >= #" & Format(Me!txtDateFrom, "yyyy-mm-dd") & "#
AND IncidentDate <= #" & Format(Me!txtDateTo, "yyyy-mm-
dd") & "# AND AccDangerousOcc = 1"
----------------------------------------------------------
I want to pass WHERE parameters, date values,
to the continuous subform of a parent form
called frmIncidentPerDepot. However I notice that
the filter of the parent form
receives these date values while the subform does not.
How do I pass the WHERE parameters to the subform?
As the parent form is just a background form.
Thank you kindly
Rhonda
==========================================================
Code calls parent form from Criteria Form:
==========================================================
TRIED: Unsuccessful can't find form called
----------------------------------------------------------
DoCmd.OpenForm "Forms!frmReportIncidentPerDepotAll!
frmReportIncidentPerDepotAllSub", , , "IncidentDate >= #"
& Format(Me!txtDateFrom, "yyyy-mm-dd") & "# AND
IncidentDate <= #" & Format(Me!txtDateTo, "yyyy-mm-dd")
& "# AND AccDangerousOcc = 1"
----------------------------------------------------------
THIS WORKS BUT DOESN'T SEND DATE RANGE TO SUBFORM
DoCmd.OpenForm "frmReportIncidentPerDepotAll", , , "Inciden
tDate >= #" & Format(Me!txtDateFrom, "yyyy-mm-dd") & "#
AND IncidentDate <= #" & Format(Me!txtDateTo, "yyyy-mm-
dd") & "# AND AccDangerousOcc = 1"
----------------------------------------------------------