Results 1 to 9 of 9
  1. #1
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481

    Filtering Graph at a Form based on Date Range!

    Hi

    I have form "FrmGraph" where a chart is drawn via QryGraph" which has fields "CusID", "CusName", "Product", "SoldQty", "SalesDate",etc.

    Its been very easy to control the graph with Customer name via the Combo Box "CboCustomer" by linking the Child & Parent fields but what could be the way out to filter the graph results according to the desired period.

    Assume Date range fields are created via the Text boxes "TxtStartDate" and "TxtEndDate" at the same form.



    Kindly advise the needful.

  2. #2
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    The desired sample screen view is enclosed.
    Attached Thumbnails Attached Thumbnails GraphScreen.png  

  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,928
    I have never found the Master/Child Link properties of graph control useful. I build filter criteria into the graph SQL statement.
    Such as: CustomerID = [cboCustomer] AND SalesDate BETWEEN [TxtStartDate] and [TxtEndDate]

    However, I have never had to use a CROSSTAB query for any graphing. Post your graph SQL statement.
    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
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Hi

    Thanks for advise and its probably true.

    Code:
    SELECT QryDisplayResidueScreening.SampleDate, QryDisplayResidueScreening.[Residue%], QryDisplayResidueScreening.BCCode, QryDisplayResidueScreening.SampleLocationFROM QryDisplayResidueScreening;
    The field to show only is "SampleDate" & "Reside%"

  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,928
    Don't include fields in SELECT clause that are not needed for graph. Now try the WHERE clause as suggested.

    Advise not to use punctuation/special characters (underscore only exception) in naming convention. Better would be ResiduePct.
    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
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Hi
    Well. I thought as i saw one video lecture in which he kept the customer Name as for the purpose of selection.

    Anyways, its good idea and i will not keep those fields in the graph data.

    It would be appreciated if can provide the SQL statement for the above selection criteria and data?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    I already suggested a WHERE clause criteria in post 3.
    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.

  8. #8
    cap.zadi is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Hi

    I did not get the idea.

    Kindly help with the code.

    Regards

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Maybe:

    SELECT QryDisplayResidueScreening.SampleDate, QryDisplayResidueScreening.[Residue%] FROM QryDisplay WHERE CustomerID = [cboCustomer] AND SalesDate BETWEEN [TxtStartDate] and [TxtEndDate];
    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: 4
    Last Post: 11-20-2018, 11:57 PM
  2. Replies: 2
    Last Post: 12-16-2012, 01:40 AM
  3. Graph date range from query
    By dhicks19 in forum Access
    Replies: 1
    Last Post: 06-29-2012, 12:26 AM
  4. Filtering by text or date range
    By Ashe in forum Forms
    Replies: 5
    Last Post: 03-07-2011, 03:00 PM
  5. Replies: 13
    Last Post: 09-27-2010, 03:10 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