Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Posts
    292

    Unanswered: Access 97 graphing

    Hi,

    I have a table which has data like so:

    table = "tblInspections"
    being date.....end date..........INSP
    ----------------------------------------
    09/26/2003...09/10/2003.......CO12
    10/01/2003...10/03/2003.......CO9
    11/01/2003...11/04/2003.......AB
    11/01/2003...11/04/2003.......AB3
    11/01/2003...11/04/2003.......AB17
    11/05/2003...11/08/2003.......DR
    11/05/2003...11/08/2003.......DR23
    11/05/2003...11/08/2003.......DR56
    11/05/2003...11/08/2003.......IS
    11/05/2003...11/08/2003.......ME
    11/05/2003...11/08/2003.......PS
    11/05/2003...11/08/2003.......PS20
    11/05/2003...11/08/2003.......PS98
    11/05/2003...11/08/2003.......PF98
    11/05/2003...11/08/2003.......PF29
    11/05/2003...11/08/2003.......PF
    11/05/2003...11/08/2003.......PF8

    Next, I have a form called "form1"
    On this form there are two fields which lets the user enter in beginning date and end dates to retrieve records.. After the user types in dates.. he hits a button which counts the first two letters of the field "INSP" in table "tblInspections"...

    So if the user leaves the dates fields blank ( which would retrieve all records in table "tblInspections" ) the output should look like so:
    ------------------
    CO=2
    AB=3
    DR=3
    IS=1
    ME=1
    PS=3
    PF=4
    ======
    total = 17

    The output here is stored in a query called "query3"

    Still on "form1" .. I created a pie chart which displays the contents of "query3"..

    So after the user enters in dates and hits the button.. A chart is displayed of "query3"

    No problems so far there...

    I have spoken with the users of the program and they want to add sections to this pie chart..

    First section:
    "Civil" - Civil is a count of all AB + CO, so in the above example I would get a number 5 to graph. Since Civil is AB + CO, I will not need to show AB or CO anymore so how can add civil and take away AB and CO ?

    Second section:
    "Welding" - This section would consist a count of all PF98 + PS98, From the example above Welding = 2

    Third section:
    "Hydrotest" - This section would consist a count of all PF29 + PS20, From the example above
    Hydrotest = 2

    Fouth section:
    "Piping" - The remaining PF and PS that does not have PF98, PS98, PF29 or PS20 would be classified here...
    Piping = 3

    After all that my query should look something like this to be graphed:
    --------------------
    Civil=5
    Welding=2
    Hydrotest=2
    Piping=3
    DR=3
    IS=1
    ME=1
    ======
    total = 17

    My question would to be how to add those section to my chart leaving the total to be the same.

    thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Danbury,ct 06801
    Posts
    24
    i think that u can you iif Funcation with in the Qruey 3 , where 1 of the field is like exp: iff() the use string compare funation to get ... cilivl and all the other info... then do pie chart on that...
    hbhavsar

  3. #3
    Join Date
    Jul 2003
    Posts
    292
    could you explain more in detail.. i kinda new to all this.. thanks

  4. #4
    Join Date
    Nov 2003
    Location
    Danbury,ct 06801
    Posts
    24
    hi

    once u have "OC", "AB ", act.. in 1 field right ...then create a Qurey with that table or query

    add 1 more field in it ... name whatever u want.. then

    right exepratation in the field using iif () and string match funcation.. like

    field have OC, AB act.. right

    iff(strcmp(Insp,"OC"),Civil,iff(strcmp(Insp,"AB"), Civil,)) ... and more ... in yr field exepratation...

    if u do count on 1 of the field then yr total count will be the same..

    then u can do ur chart on the result of that Query....

    hopefully i can help you out

    later
    hbhavsar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •