Fromdate and Todate on Report

  • Thread starter Kevin via AccessMonster.com
  • 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
 
A

Al Camp

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
 
K

Kevin via AccessMonster.com

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Report Parm 1
Reports - todate fromdate 3
Report Parameters on Form 3

Top