Show only one month in the graph ?

S

SpookiePower

Each day I enter a number and the current date into a table.
Now I want to displayes all these numbers/dates in a graph, but only
one month at a time. As it is right now, all the months that I have
entered this number/date is showed in the graph.

I want to put a combobox on the form, that holds all the months,
and from that I will choose which month I want to see in the graph.

The sql in the rowsource looks like this -
SELECT (Format([dato],"DDDDD")),Max([kg]) AS [MaxOfkg] FROM [taVaegt] GROUP BY (Int([dato])),(Format([dato],"DDDDD"));

I think that somewhere in this sql I have to put the "month = combobox", but I dont know where.
 
G

Guest

Better than a combo box would be a text box.

Try this entering a standard date format in the text box.
SELECT (Format([dato],"DDDDD")),Max([kg]) AS [MaxOfkg] FROM [taVaegt]
GROUP BY (Int([dato])),(Format([dato],"DDDDD"))
WHERE Format([YourDateField], "yyyymm") =
Format([Forms]![YourFormName]![YourControl], "yyyymm");
 
S

SpookiePower

KARL DEWEY said:
Better than a combo box would be a text box.

Try this entering a standard date format in the text box.
SELECT (Format([dato],"DDDDD")),Max([kg]) AS [MaxOfkg] FROM [taVaegt]
GROUP BY (Int([dato])),(Format([dato],"DDDDD"))
WHERE Format([YourDateField], "yyyymm") =
Format([Forms]![YourFormName]![YourControl], "yyyymm");

What you say is that I should enter the year/month like this 200605
if I want to see last month in the graph ?
 

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


Top