Results 1 to 4 of 4
  1. #1
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jun 2016
    Posts
    237

    ON No Data event main report and 2 subreports


    Hi,
    I have a main report with two sub reports. If one of the sub reports has no data then it is not shown on the report. The second sub report is shown. This does not look nice. Any ideas how to solve this?
    May be printing something on the sub report with no data to denote that there is not data for it. Main and 2 subreports had On No Data event.

    Khalil

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you could add an invisible 3rd box that displays when the subform is empty.
    in the REPORT LOAD event

    Code:
    iRecCount = Dcount("*","qsQuery")   'the sub report query
    subRpt.visible = iRecCount >0
    
    txtNoDataMsg.visible = iRecCount = 0


  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Or use a label.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jun 2016
    Posts
    237
    Thank you.
    Worked

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

Similar Threads

  1. Replies: 8
    Last Post: 04-12-2018, 12:13 PM
  2. Replies: 2
    Last Post: 01-11-2018, 12:10 PM
  3. Main Report and Subreports repeating data
    By PinkLady50 in forum Reports
    Replies: 17
    Last Post: 09-15-2017, 09:37 AM
  4. Empty Main Report, won't run subReports
    By rankhornjp in forum Reports
    Replies: 8
    Last Post: 03-15-2013, 11:07 AM
  5. Replies: 1
    Last Post: 11-24-2012, 04:40 PM

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