I need help on how to correctly identify dates from a form in queries.
I have
MainForm: ShopOpNavigation (used the wizard)
Subform: frmReports where the user enters txtFromDate and txtToDate
That is fine.
Reports:
Main Report: Report1 which has only titles for the report, no recordsource
Sub Report: Rpt1 which has it's own recordsource
Sub Report: Rpt2 which has a different recordsource
On the FrmReports, I have a button that opens the selected report with
The filter StrWhere passes to the mainreport fine but not the subreports.
I have read many different ways suggested to pass to the subreport but can't seem to get it to work.
the last one I was going to try was Duane's suggestion on a post
Between Forms!frmX!txtFromDate and Forms!frmX!txtToDate But do not know how to reference it properly.
I Tried:
Between Me!ShopOpNavigation.Form!frmReports.Form!txtFromDate and Me!ShopOpNavigation.Form!frmReports.Form!txtFromDate
I don't get any errors but I also don't get any records
If I run the report by itself (leaving frmreports open), I get an error
The expression On Open you entered as the event property setting produced the following error: Object or class does not support the set of events
Thanks
Lhuffst
I have
MainForm: ShopOpNavigation (used the wizard)
Subform: frmReports where the user enters txtFromDate and txtToDate
That is fine.
Reports:
Main Report: Report1 which has only titles for the report, no recordsource
Sub Report: Rpt1 which has it's own recordsource
Sub Report: Rpt2 which has a different recordsource
On the FrmReports, I have a button that opens the selected report with
Code:
StrWhere = "[dateadded] between #" & Me.txtfromdate & "# and #" & Me.txtToDate & "#"
DoCmd.OpenReport "Report1", acViewPreview, , StrWhere
The filter StrWhere passes to the mainreport fine but not the subreports.
I have read many different ways suggested to pass to the subreport but can't seem to get it to work.
the last one I was going to try was Duane's suggestion on a post
Between Forms!frmX!txtFromDate and Forms!frmX!txtToDate But do not know how to reference it properly.
I Tried:
Between Me!ShopOpNavigation.Form!frmReports.Form!txtFromDate and Me!ShopOpNavigation.Form!frmReports.Form!txtFromDate
I don't get any errors but I also don't get any records
If I run the report by itself (leaving frmreports open), I get an error
The expression On Open you entered as the event property setting produced the following error: Object or class does not support the set of events
Thanks
Lhuffst