Welcome to SPN

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

Sign Up Now!

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.
     

Share This Page