Results 1 to 4 of 4
  1. #1
    kentclub is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    2

    Updating a chart with a button

    Hello,


    I have a chart that gathers its information from a query.

    What the chart shows is the number of businesses for each month over the year (I have a table with a list of businesses that each have a date).

    I have added a "next" and "previous" button and a label on the chart : so if the label shows "2014", when you click on "next" it becomes "2015".
    Now I need to be able to also change the chart so that it actually takes the year displayed in that label and shows the businesses for each month that year.

    Would you happen to know how ?



    Thanks !

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    The chart's RowSource can have a dynamic filter criteria that references the label (this would usually be a textbox).

    Example from my db:

    SELECT M, D, FD, ZD, ZDM FROM GraphProctor WHERE LabNum=[tbxLabNum];
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kentclub is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jan 2015
    Posts
    2
    Hi,

    I've managed to enter the code in the query generator but now nothing changes when I change the year (by pressing the button to switch to 2015, 2016 etc...)

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-10-2014, 06:22 PM
  2. Replies: 1
    Last Post: 07-18-2014, 04:11 AM
  3. Replies: 5
    Last Post: 01-15-2013, 01:15 PM
  4. Updating another record table with command button
    By erlan501 in forum Programming
    Replies: 5
    Last Post: 04-26-2010, 09:03 AM
  5. Replies: 5
    Last Post: 01-14-2010, 03:37 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums