Replacing Empty Subforms on Reports

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • garfieldsevilla
    New Member
    • Feb 2010
    • 37

    Replacing Empty Subforms on Reports

    Hi, I a several subforms in a report and for some records the subforms do not return any data. When this happens, I would like to display a message as at present the area normally occupied by the subform is simply blank. Can anyone help me? Thanks in advance.
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    Hi garfieldsevilla

    What I do is to have a hidden label (or could be an image) on top of the subreport. In the detail event of the main report, I run a dcount, to check whether the subreport will have any records, and if not, I change the visibility of the label.

    Comment

    • garfieldsevilla
      New Member
      • Feb 2010
      • 37

      #3
      hi, thanks for your reply.
      Could you elaborate? I'm using A2003 and do not see a detail event control in the report properties box.
      Also, each record is being printed on a new page, and each page has a new set of subdata. Will this work? Sorry, I'm not a very advanced access user.

      Comment

      • TheSmileyCoder
        Recognized Expert Moderator Top Contributor
        • Dec 2009
        • 2322

        #4
        Hi garfield.

        I made a video as an example to illustrate.
        http://www.youtube.com/watch?v=SaUvl94bmyA
        Last edited by MMcCarthy; Mar 22 '11, 07:54 AM. Reason: testing addition of youtube video

        Comment

        • garfieldsevilla
          New Member
          • Feb 2010
          • 37

          #5
          Thank you for taking the time to record this. My reports now have messages when there is no data in the subform!

          Comment

          • TheSmileyCoder
            Recognized Expert Moderator Top Contributor
            • Dec 2009
            • 2322

            #6
            Im glad to hear that.

            Note that you can use an image instead of a label if you prefer. The method is the same.

            Comment

            Working...