Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Northern, NJ, New Jersey, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Chart Requery not working (2000)

    I know I have seen this but cannot find it by searching.

    I have a 5 page report that consist of year-over-year data by day. Each page is filtered by the name of the REGION and the line graph chart is supposed to requery itself when the detail section is formatted using the following VB:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me!Graph192.Requery
    End Sub


    When the pages are reviewed the chart is NOT different for each as it should be and each time the report is rendered I have a different result on which (if any) charts are duplicated to a different page.

    Is there a better way to secure against this issue?
    There is always a way.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Chart Requery not working (2000)

    First, check that the chart is linked to the report. The LinkChildFields and LinkMasterFields properties of the chart should both be set to the Region field. In fact, that should make requerying the chart unnecessary.

    If that doesn't help, include the Region from the report as a parameter in the Row Source of the chart. Edit the row source to add a condition on the Region field. the Criteria line should read something like

    Reports!rptMyReport!Region

    with the appropriate names substituted.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Northern, NJ, New Jersey, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Chart Requery not working (2000)

    The LinkChildField and LinkMasterField are already set to Region.

    The Row Source looks like this:
    SELECT [Day],Sum([2002GA]) AS [SumOf2002GA],Sum([2003GA]) AS [SumOf2003GA] FROM [Daily02Chart] GROUP BY [Day];

    How would this be altered to add the region as a parameter?
    There is always a way.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Chart Requery not working (2000)

    In the first place, if Daily02Chart is a query, make sure that it contains the Region field. If not, add it now.
    Try the following, where you must replace rptMyReport by the actual name of your report:

    SELECT [Day],Sum([2002GA]) AS [SumOf2002GA],Sum([2003GA]) AS [SumOf2003GA] FROM [Daily02Chart] WHERE Region = [Reports]![rptMyReport]![Region] GROUP BY [Day];

    <!mskb=318079>Microsoft Knowledge Base Article 318079<!/mskb> provides yet another workaround. The first method mentioned there is the one you used without success, but you might try the second one involving DoEvents.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •