Results 1 to 12 of 12
  1. #1
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    How to Indicate NO DATA


    In the attached DB I have a Report whose some sections have NO Data. I have written code in ReportAmtISum, ReportAmtFSum, ReportAmtMSum to indicate NIL, but it is not working. Kindly guide me as to what I should do.
    Attached Files Attached Files

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,535
    Put your code in the OnFormat event of the "Detail" section of the report.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    How to Indicate NO DATA???

    Quote Originally Posted by Bob Fitz View Post
    Put your code in the OnFormat event of the "Detail" section of the report.
    Sorry! It didn't work.

  4. #4
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    You will have to do it for each sub reports detail on format section.

    The other option is to hide the sub report using the on NoData property.
    Again this would have to be set for each report / sub-report as each section does not know about the others results.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    "Doesn't work" means what - error message, wrong result, nothing happens? Post attempted code.

    One-liner:

    Me.Label7.Visible = IsNull(Me.SumOfAMOUNT)

    Be aware Format event does not run for ReportView.
    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.

  6. #6
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Regarding Indication of NO DATA

    Quote Originally Posted by June7 View Post
    "Doesn't work" means what - error message, wrong result, nothing happens? Post attempted code.

    One-liner:

    Me.Label7.Visible = IsNull(Me.SumOfAMOUNT)

    Be aware Format event does not run for ReportView.

    Sorry, Sir! I had put the code in top level report. I have corrected the mistake and placed your one-liner on the lowest report containing the 2 controls. I am enclosing the file for you to view. Thanks a lot! GOD BLESS YOU!!! One humble request plese brief me about the ON FORMAT event.
    Attached Files Attached Files

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    You put code in Format event? What do you need to know? Did you Google for more info?
    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.

  8. #8
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Regarding Indication of NO DATA

    Quote Originally Posted by Minty View Post
    You will have to do it for each sub reports detail on format section.

    The other option is to hide the sub report using the on NoData property.
    Again this would have to be set for each report / sub-report as each section does not know about the others results.

    I would like to know about the other option of hiding the sub-reports having no data.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    Suggest you Google for info. Make an effort in that direction and when you have specific issue post question.
    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.

  10. #10
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Regarding Indication of NO DATA

    Quote Originally Posted by June7 View Post
    You put code in Format event? What do you need to know? Did you Google for more info?

    Yes I put the code in the ON FORMAT event and it worked. I would like to know when this event is fired?

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    Format event fires for PrintPreview and direct to printer, not for ReportView.
    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.

  12. #12
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Regarding Indication of NO DATA

    Quote Originally Posted by June7 View Post
    Format event fires for PrintPreview and direct to printer, not for ReportView.
    Thanks! GOD BLESS YOU!!!

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

Similar Threads

  1. Replies: 8
    Last Post: 03-15-2018, 12:23 PM
  2. Replies: 7
    Last Post: 07-24-2017, 11:47 PM
  3. Replies: 9
    Last Post: 03-01-2017, 10:00 AM
  4. Replies: 1
    Last Post: 12-21-2011, 02:11 PM

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