Sure the between statement is as below for the main Summary Report form that
calls the report:
Dim strWhere As String
strWhere = "[Payment Date]" & " Between " & Format(Me.txtStartDate,
"\#m\/d\/yyyy\#") _
& " And " & Format(Me.txtEndDate, "\#m\/d\/yyyy\#")
DoCmd.OpenReport "Summary Report", acViewPreview, , strWhere
That is working fine as far as the Main Summary report goes. The problem is
getting the subreports that use the same date span to match. The
Me.txtStartDate and Me.txtEndDate come from a Calendar Form prompt similar
to what was described on the page you listed for me to look at. I even tried
this below and it worked 1 time then stopped working.
Dim strWhere1 As String
Dim strWhere2 As String
strWhere1= "[Deposit Date]" & " Between " & Format(Me.txtStartDate,
"\#m\/d\/yyyy\#") _
& " And " & Format(Me.txtEndDate, "\#m\/d\/yyyy\#")
strWhere2 = "[Payment Date]" & " Between " & Format(Me.txtStartDate,
"\#m\/d\/yyyy\#") _
& " And " & Format(Me.txtEndDate, "\#m\/d\/yyyy\#")
DoCmd.OpenReport "Deposit Report",acViewPreview, , strWhere1, acHidden
DoCmd.OpenReport "Summary Report", acViewPreview, , strWhere2
--
Thanks
Joe Cilinceon
Duane Hookom said:
Why don't you just state what your "between statement" is? Would that
be
too
difficult?
I assume you are using a parameter prompt query. Replace the
parameters
with
references to controls on a form. Check out this page
http://www.fontstuff.com/access/acctut08.htm.