Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you add a chart into a report that is based on a date range

Status
Not open for further replies.

bethabernathy

Programmer
Jul 13, 2001
254
0
0
MX
Hi There: I am finally understanding the charts with Access, but wow, what a pain. Anyway, I have a report that is based on a query that prompts you for a date range. I created my chart which should perform the same calculations as the fields on the report. But, the chart's row source is based on a sql statement that I customized to do the summing. So, therefore the chart ignores the date range in the report.

Any suggestions. Thanks, Beth
 
O.K. now I have modified my sql statement to pull from my query, but I am prompted to enter the date range twice. Is there any way around this?

Beth
 
Use the help topic "Use a form to enter report criteria" - it brings up a nicer window for data entry and the variables are held the form where they can be accessed as needed by the report and charts.
(the OK button just makes the form not Visible - the data entry form closes when the report does)
 
This works great, thank you. An added question: How do you display the date range at the top of the report so you know the time the data is related to?
 
Found the solution to my own problem.

Add two unbound text boxes in the header and code as follows in the control source properties:

=[Forms]![sales dialog].[beginning date]
=[Forms]![sales dialog].[ending date]
Make these text boxes visible property = false
[sales dialog] is the form name where the date criteria is entered in the help topic example referenced above.

Add another unbound text box in the header and code as follows in the control source properties:

=[beginning date] & " to " & [ending date]
Keep this text box visible property = tru.
This will then display the beginning date and the ending date that was prompted and entered by the user.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top