Results 1 to 6 of 6
  1. #1
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108

    Limit chart to date range , Chart isnt updating .


    I have a form with a chart , 2 textboxes for start date and end date and a button to filter the data( filter the data by date range)

    How do i continue from that? The chart isnt updating .
    Kindly help. Thank you

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Need to know more about data structure, form and chart design, and the code.

    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.

  3. #3
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108
    I'm using "Summary" Table and the form is " Form1"
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    There is no code associated with the button. The button Click event property needs [Event Procedure] selected.

    Options for filtering chart are:

    1. set the chart Master/Child Links properties - however, not applicable to this chart because the form is UNBOUND

    2. set dynamic parameters in the chart RowSource - however, this chart RowSource is a CROSSTAB query; review http://allenbrowne.com/ser-67.html#Param

    3. code changes the chart RowSource SQL statement - again, not applicable to this chart because of CROSSTAB

    Instead of a CROSSTAB, you could emulate a CROSSTAB with expressions to generate the 3 summary fields, review http://datapigtechnologies.com/flashfiles/crosstab.html

    Parameters for date/time field need # delimiters, text field need apostrophe, number field nothing.

    strWhere = "(" & strDateField & " >= #" & Me.txtStartDate & "#)"
    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.

  5. #5
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108
    Click image for larger version. 

Name:	CROSSTABQUERY ERROR.JPG 
Views:	7 
Size:	70.7 KB 
ID:	21129


    I encounter this kind of error when i was doing the crosstab query .
    T^T

    And i dont get this part ( Parameters for date/time field need # delimiters, text field need apostrophe, number field nothing.

    strWhere = "(" & strDateField & " >= #" & Me.txtStartDate & "#)"

    Sorry , Im very new to access 2013 .

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Yes, that attempted query would generate an error. Suggestion to emulate a crosstab does not mean to build a crosstab, it means to emulate one. If you want to use the expressions approach then do not use crosstab criteria. Review the referenced tutorial again.

    What is not clear about the example for the filter criteria? It's from your code, I only added # characters. They define the parameter as a date value. Parameter for text field would instead require apostrophes. Parameter for number field does not require delimiters.
    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: 04-07-2015, 11:37 AM
  2. Updating a chart with a button
    By kentclub in forum Access
    Replies: 3
    Last Post: 01-03-2015, 08:57 PM
  3. Replies: 9
    Last Post: 01-29-2013, 06:44 PM
  4. Replies: 0
    Last Post: 12-06-2011, 05:53 AM
  5. Replies: 2
    Last Post: 07-12-2010, 05:39 AM

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