Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2002
    Location
    Kansas City, MO
    Posts
    17

    Smile Unanswered: Microsoft Access Graph In A Form

    I need help with a Microsoft Graph within a form. When I use a pivot chart it works, however, it does not keep the changes I make and continues to default back on update. So, I am trying to utilize the Microsoft chart which is a unbound object. I have a form that has a drop down combo that tells all the data within the form to change data by month. My graph is within a subform. Because it is an unbound object I am not able to tell the 2 forms to talk to each other by month. I am attaching an example. I need the chart to change by month. Any help will be appreciated. Do I need a macro? If so how would I do that?
    Attached Files Attached Files
    Karol

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,420
    Provided Answers: 7
    in the subform the record source of the graph should be pointing to the combo box

    What i do is open both forms
    then open the record source of the graph which will open a query window
    them in the Criteria right click and click the build then select the forms them the Loaded forms then the from then double the the feild(combo box) then ok
    close the query window click yes save
    we need to repaint the subforms
    so in the afterupdate event
    Me.Repaint [subformname]
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Apr 2002
    Location
    Kansas City, MO
    Posts
    17
    How can I point my subform to the combo box? It is an unbound object? If possible are you able to take my attachment and show me how? I would greatly appreciate it.
    Karol

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Karol,

    Follow the instructions in myle's post. If you walk through the steps he has described you shouldn't hit any problems!

    Give it a try and let us know how you get on.
    George
    Home | Blog

  5. #5
    Join Date
    Apr 2002
    Location
    Kansas City, MO
    Posts
    17

    Microsoft Access Graph In A Form

    Ok. I tried what Mylie advised. Here is what I did, I must be doing something incorrectly:
    1. I opened the subform graph1 in design view and the form FSMonthly Summary,Then I clicked on the unbound object and went to the record source and opened the query FSgraph. Within the criteria under "month" I did a right click on build and went to loaded forms. I found the combo box option and clicked on it. I now have the following criteria: Forms![FS Monthly Summary]![Combo237]. I save the form. Now when I go back to the form FSMonthly Summary that has the subform graph1 within it. The graph is greyed out and does not like what I did at all. So.......What did I do incorrectly?
    Karol

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Depending on your combobox setup...
    Code:
    Forms![FS Monthly Summary]![Combo237].Value
    Forms![FS Monthly Summary]![Combo237].Colum(n) 'where n represents the index number
    George
    Home | Blog

  7. #7
    Join Date
    Apr 2002
    Location
    Kansas City, MO
    Posts
    17

    Microsoft Access Graph In a Forum

    Still having no luck... I tried both options. When I add Forms![FS Monthly Summary]![Combo237].Value within the (month ID) query field I still get a grayed out graph. It doesn't even show the graph. When I tried the 2nd option: Forms![FS Monthly Summary]![Combo237].Colum(2) (note: I used 2 since that is the index number of the combo box) I get an error dialog box that says the following: Undefined function 'Forms[FS Monthly Summary]!Combo237.Colum' in expression. When I select OK, the whole subform is not showing at all it is totally white.
    Karol

Posting Permissions

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