Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Show only one month in the graph ?

Discussion in 'Information Technology' started by SpookiePower, Jul 28, 2006.

Tags:
  1. SpookiePower

    SpookiePower
    Expand Collapse
    Guest

    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.




    ---
    My PhotoGallery
    www.photo.activewebsite.dk
     
  2. Loading...


  3. KARL DEWEY

    KARL DEWEY
    Expand Collapse
    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");


    "SpookiePower" wrote:

    > 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.
    >
    >
    >
    >
    > ---
    > My PhotoGallery
    > www.photo.activewebsite.dk
    >
    >
    >
     
  4. SpookiePower

    SpookiePower
    Expand Collapse
    Guest

    "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> skrev i en meddelelse news:C4FC9FCD-D780-4F6E-9F7D-F022871CCCA3@microsoft.com...
    > 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 ?
     
  5. SpookiePower

    SpookiePower
    Expand Collapse
    Guest

    I get an error. It says that there is missing an operator in the sql.
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page