Graph Query

K

Kay

Hi
Im trying to create a query that will prompt the user to enter a start
and end date. The query will then display the count of records saved
each day between the 2 dates entered.

Can anyone help pleeeeeeeeeeeeease?
 
D

Duane Hookom

Consider allowing your users to enter/select two dates on a form rather than
using a parameter prompt. Create the form with the two text boxes. Then
create a query with SQL syntax like:

SELECT [YourDateField], Count([YourDateField]) as Records
FROM [tblYourTable]
WHERE [YourDateField] Between Forms![frmYourForm]![txtStart]
And Forms![frmYourForm]![txtEnd]
GROUP BY [YourDateField]
ORDER BY [YourDateField];

Save the above query with a name like "qtotDailyTotalForGraph". You can then
drop a graph/chart control on your report and use the query as the Row
Source.
 
K

Kay

Hi Duane

You have put in just one date field. Wouldnt that search for the count
of records just on that one day.
 
D

Duane Hookom

Did you try it?
If you can't figure it out, please feel free to come back and tell us what
you attempted and what results you got.
 
Top