Fromdate and Todate on Report

  • Thread starter Thread starter Kevin via AccessMonster.com
  • Start date Start date
K

Kevin via AccessMonster.com

I have a form “frmReportPanel” where the user can pick a fromdate and todate.
Then when the user click on the report, the report should reflect the date
range.

I got the detail data on the report to match the parameter date range picked
from the report
panel, But the "fromdate" and "todate" fields at the top of my report do not
match the parameters on the report panel. I'm using the fromdate" and
"todate" fields at the top of my report (in the report header section) to let
the User know he has the correct date range.

How do I get the fromdate" and "todate" fields at the top of my report to
match the parameters picked on the report panel form??
Here’s my SQL:

SELECT DISTINCTROW qryResolution.TrackingNo, qryResolution.CompanyName,
qryResolution.CustomerNo, qryResolution.TempName, qryResolution.JobOrder,
qryResolution.[WE-Date], qryResolution.AssignedDate, qryResolution.AssignedTo,

qryResolution.Reportedby, qryResolution.ReportedDate, qryResolution.WorkFlow,
qryResolution.Status, qryResolution.[Issue-ActionNotes], tblParm.FromDate,
tblParm.ToDate, tblParm.AssignTo, qryResolution.IssueType
FROM qryResolution, tblParm
WHERE (((qryResolution.JobOrder) Is Not Null) AND ((qryResolution.
AssignedDate) Between [FromDate] And [ToDate]) AND ((qryResolution.AssignedTo)

=[Forms]![frmReportPanel]![AssignTo]));

Thanks,
Kevin
 
Kevin,
Something odd here... if your FromDate and To Date values are on the
form, you should be referring to them in the query and report as...
Between Forms!frmYourForm![FromDate] And Forms!frmYourForm![ToDate])
AND.....

In the report header...
= "From " & Forms!frmYourForm!FromDate & " to " &
Forms!frmYourForm!ToDate
should display the values from the form.

Given the code you posted though, there's something bothering me about
how you described the problem. I would have expected that after entering
the 2 dates on the form, and clicking for the report, and since your query
dates values are incorrectly referred to... I would have expected another 2
prompts for the date before the report really came up.
But... let's let that go for now... just try my references and see how it
goes.
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
This Worked Perfectly!! Thanks Al..................

Kevin

Al said:
Kevin,
Something odd here... if your FromDate and To Date values are on the
form, you should be referring to them in the query and report as...
Between Forms!frmYourForm![FromDate] And Forms!frmYourForm![ToDate])
AND.....

In the report header...
= "From " & Forms!frmYourForm!FromDate & " to " &
Forms!frmYourForm!ToDate
should display the values from the form.

Given the code you posted though, there's something bothering me about
how you described the problem. I would have expected that after entering
the 2 dates on the form, and clicking for the report, and since your query
dates values are incorrectly referred to... I would have expected another 2
prompts for the date before the report really came up.
But... let's let that go for now... just try my references and see how it
goes.
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
I have a form "frmReportPanel" where the user can pick a fromdate and
todate.
[quoted text clipped - 33 lines]
Thanks,
Kevin
 
Back
Top