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

    Line Chart Newbie Questions

    Hi All,

    I have a line chart that is reading data from a query, its reading pressure levels [Elevation (m H2O)] at various times [RecordingsDateTime] from different locations [SensorName]. The recordings are usually twice a day but the line chart Axis (category) only appears to allow a minimum of daily data and therefore sums the two if on the same day. How can I change this to display each reading?

    Is it also possible to have a dropdown menu to only select one series? The query contains all locations but I only want to view one location at a time.



    Thanks,
    RB

  2. #2
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    I've created a query linked to the dropdown box and now getting the values in the query I want to be display based on the combobox selection. However, when I try to plot this on the line chart it appears blank when I select a Legend (series).

    Looking at the Transformed Row Source for the chart it says it doesnt recognise the combobox as a valid field name or expression when I try to the query. The query runs fine outside of the line chart. Any ideas how to fix?

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    Need to provide SQL statement for analysis. And sample data would be helpful. Could provide db. 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.

  4. #4
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    Attached the version I'm playing around with. Its the line chart on frmVWPChart I want to display similar to how it currently is but link to qrySensorSelected2 so it only displays sensors from the selected location in Combo46.

    After that I'd like to be able to put date range limits on the x-axis, I assume this is best done by linking the query to two new date text boxes if I can get the query working in the line chart.
    Attached Files Attached Files

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    Unfortunately, I cannot work with Modern Charts because I use Access 2010. The chart doesn't even appear for me.

    So I tested with a classic MSGraph chart.

    After making criteria selections, need to refresh chart. Can do this with the Refresh button on ribbon or VBA.

    Exactly what are you entering into the chart RowSource property?
    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.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,991
    If you look at the transform SQL in the chart data property sheet, you will see why it only shows readings for each day.
    You need to edit the SQL statement that Access 'helpfully' created to show the date and time
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    Quote Originally Posted by June7 View Post
    Unfortunately, I cannot work with Modern Charts because I use Access 2010. The chart doesn't even appear for me.

    So I tested with a classic MSGraph chart.

    After making criteria selections, need to refresh chart. Can do this with the Refresh button on ribbon or VBA.

    Exactly what are you entering into the chart RowSource property?
    When I select the row source as qrySensorSelected2 and get the error mentioned above that it doesnt recognise Cpmbo46 as a valid field name or expression, the transformed row source Im using is:
    TRANSFORM Max([Elevation (m H2O)]) AS [MaxOfElevation (m H2O)] SELECT Format([RecordingDateTime], "DDDDD") FROM [qrySensorSelected2] GROUP BY Format([RecordingDateTime], "DDDDD"), Int([RecordingDateTime]) ORDER BY Int([RecordingDateTime]) PIVOT [SensorName]

    qrySensorSelected2 works fine as a query by itself just wont display the results on the chart.

  8. #8
    RB85 is offline Novice
    Windows 11 Access 2016
    Join Date
    May 2023
    Posts
    25
    Latest problem solved. I had to define the combo box parameter in the query.

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    5,007
    Quote Originally Posted by RB85 View Post
    Latest problem solved. I had to define the combo box parameter in the query.
    Please mark it solved then.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Newbie w/a few questions
    By Davo in forum Access
    Replies: 3
    Last Post: 11-14-2011, 01:13 PM
  2. Couple of newbie questions
    By Awowk in forum Access
    Replies: 12
    Last Post: 08-06-2010, 01:16 PM
  3. Replies: 2
    Last Post: 07-12-2010, 05:39 AM
  4. Basic questions from a newbie! :(
    By Michael_ in forum Access
    Replies: 6
    Last Post: 05-07-2010, 02:41 PM
  5. newbie questions
    By bigmac in forum Access
    Replies: 0
    Last Post: 10-07-2008, 12:53 AM

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