Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2022
    Posts
    21

    Update chart based on query

    Afternoon,

    I am trying to update a chart on a form using combo boxes, as I am not to familiar with charts this is what I have, I do not get any errors it just does not populate. Any help please?

    Code:
    Option Explicit
    
    
    Private Sub comboNAME_Change()
    
    
    Dim objChart As Chart
    Set objChart = Me.Chart4
    
    
    With objChart
        .ChartTitle = "myTimeKeeper"
        .RowSource = "SELECT * FROM tablemyTimeKeeper WHERE myDate=" & txtDATE.Value & " AND myName=" & comboNAME.Value & ""
        .ChartAxis = "myName"
        .ChartValues = "myDate"
    End With
    
    
    Me.Chart4.Requery
    
    
    End Sub


  2. #2
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,121
    Please try:
    Code:
    .RowSource = "SELECT * FROM tablemyTimeKeeper WHERE myDate=#" & txtDATE.Value & "# AND myName='" & comboNAME.Value & "'"
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Join Date
    Mar 2022
    Posts
    21
    Thanks, got something working, still figuring out my X and Y axis and data though lol

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

Similar Threads

  1. Replies: 10
    Last Post: 07-14-2021, 02:08 PM
  2. Replies: 2
    Last Post: 12-18-2019, 10:40 PM
  3. Replies: 2
    Last Post: 08-03-2017, 04:58 AM
  4. Replies: 11
    Last Post: 12-25-2015, 02:41 PM
  5. Replies: 3
    Last Post: 08-13-2015, 07:06 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