• Report prints no data (97)

    • This topic has 6 replies, 5 voices, and was last updated 23 years ago.
    Author
    Topic
    #371473

    Report prints no data
    In my report

    Viewing 2 reply threads
    Author
    Replies
    • #590533

      When you run your query as a select query, does this number

    • #590559

      If your report doesn’t show any data, then it probably means that there are no records in its recordset that match the filter you have applied. Is that WHERE clause you showed in the query or is it a filter applied to the report? I don’t quite understand what you mean by calling a macro that will filter the data, though. All you need to is use minimal code to apply a filter without a macro. Alternatively, you can use a parameter query to limit the recordset behind the report without involving a macro or filter at all.

    • #590618

      A couple of points:

      1 – Is the filter value constant? i.e. do you ONLY ever want to filter on Retailer 50138?

      If yes, then change the recourdsource of the report to a query, where the value of 50138 is entered into the conditions row for RetailerNumber

      2 – If the filter is not consistant (i.e. Different Retailers are reported depending upon where the report was called from), then again,m set the record source to a query, and set the Condition row of the RetailerNumber to “=[Enter Required Retailer]” (do not include the quotes)

      3 – If the report is called from a form, via the means of a Command Button, then go into the properties window of the command button, and then onto the events tab.

      Select on_Click, where it should read ‘[Event Procedure]’ – select this row, and then click on the elipses to the far right ( the three dots)

      Assuming the button was placed with the wizards switched on, it should read:

      Dim stDocName As String

      stDocName = “Digest Master: Budget Analysis” ‘- this will be the name of your report
      DoCmd.OpenReport stDocName, acPreview
      [/b]

      Change the secon line (DoCmd.OpenReport…) to read:

      DoCmd.OpenReport stDocName, acPreview,,”[RetailerNumber]=50138″[/i]

      I hope this helps

      • #590643

        Thanks all for your suggestion.
        What I went with eventually was to get rid of the macro.
        In the reports filter property I just stuck one long string of values to filter on (50138 was not the only dealer)
        I couldn

    Viewing 2 reply threads
    Reply To: Report prints no data (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: