Results 1 to 2 of 2
  1. #1
    mrwhitehat is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7

    If no records exist

    Fellow access users:

    I have a report with a list of Items associated with a Person. Some of the "Person" records do not have any "Items" associated with them. If that is the case, how can I print an alternate text such as "No Items Detected"?

    It tried the following, but it did not work...

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Me.Report.HasData Then
    Me.lblNoMinistry.Visible = False
    Else
    Me.lblNoMinistry.Visible = True
    End If
    End Sub



    Thank you.
    Last edited by June7; 08-26-2013 at 10:03 PM. Reason: merge posts

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Report structured to show a person even if there are no related 'Items' records? Is this a report/subreport? If all persons are displayed, what piece of missing data indicates there are no Items - ItemID? Try expression in textbox: =Nz([ItemID],"No Items Detected")
    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.

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

Similar Threads

  1. If exist update else enter
    By mkling in forum Access
    Replies: 15
    Last Post: 05-22-2012, 07:44 AM
  2. If value already exist or not in the table
    By dada in forum Programming
    Replies: 3
    Last Post: 08-19-2010, 01:57 AM
  3. Check if value exist in a table
    By Lucas83 in forum Programming
    Replies: 2
    Last Post: 06-02-2010, 11:42 AM
  4. Form doesn't exist
    By Back2Basics in forum Access
    Replies: 1
    Last Post: 02-01-2010, 11:39 AM
  5. Replies: 1
    Last Post: 08-22-2006, 04:27 AM

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