Results 1 to 12 of 12
  1. #1
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25

    Line Chart Refresh in Form


    I want my line chart, based on a combo box linked to query, to refresh when I click a button. I have tried a number of different codes that I've found through Googling the issue but none are working to refresh the line chart. I tried the built in refresh button and the codes similar to the below for an On Click event procedure:

    [Forms]![frmVWPChart]![Chart54].Refresh
    [Forms]![frmVWPChart]![Combo46].Refresh
    [Forms]![frmVWPChart]![Combo46].Requery
    [Forms]![frmVWPChart].Refresh
    [Forms]![frmVWPChart].Requery
    Me.Refresh
    Me.Requery

    Nothing happens when I click when using any of those but it does update when clicking 'Refresh All' on the Home toolbar.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Can you post a copy of your db
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    Attached in the zip file.
    Attached Files Attached Files

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Have you tried:

    Me.Chart54.Requery
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    I get the error 'Access cannot find the object 'Me.'

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Try attached:
    Attached Files Attached Files
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    That doesnt work for me, maybe using different versions? Im on 2016

  8. #8
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by RB85 View Post
    That doesnt work for me.....
    Not very informative. Care to tell us what happens?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  9. #9
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    Nothing happens. Click the button and it doesnt give an error or seem to do anything, same as most of the other ways I've tried.

  10. #10
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by RB85 View Post
    Nothing happens. Click the button and it doesnt give an error or seem to do anything, same as most of the other ways I've tried.
    Is this the db that I posted?
    Have you checked that the code does actually run?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  11. #11
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    Im not convinced it is running, I tried creating some errors in it and on click it still does nothing. What could be stopping it from running?

  12. #12
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2019
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Quote Originally Posted by RB85 View Post
    Im not convinced it is running, I tried creating some errors in it and on click it still does nothing. What could be stopping it from running?
    The dB that I posted worked fine for me. If it does not work for you then I have no idea of why that might be. Hopefully, someone with greater knowledge will be able to help ��
    EDIT:
    Perhaps you could put a breakpoint at the start of the event code and then step through each line of code
    Last edited by Bob Fitz; 09-09-2023 at 03:24 PM.

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

Similar Threads

  1. Chart Reference Line
    By JonathanT in forum Forms
    Replies: 30
    Last Post: 08-05-2023, 06:28 PM
  2. line chart on report
    By BobW2961 in forum Reports
    Replies: 2
    Last Post: 08-15-2018, 11:38 AM
  3. Refresh chart
    By jle0003 in forum Forms
    Replies: 1
    Last Post: 09-05-2012, 06:53 PM
  4. Replies: 2
    Last Post: 07-12-2010, 05:39 AM
  5. Line-Bar Chart Issue
    By santoshpk in forum Reports
    Replies: 0
    Last Post: 03-17-2009, 02:47 PM

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