Results 1 to 3 of 3

Thread: Event code

  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts

    Event code

    When I view the code for the On NoData event procedure in a couple of reports in Access 2007, the following is displayed.

    -----------
    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.[Label].Visible = Not IsNull(Me.[Field])
    End Sub

    Private Sub Report_NoData(Cancel As Integer)
    MsgBox "There are no records matching the specified parameters.", vbExclamation, "Empty report"
    Cancel = True
    End Sub
    -----------

    I know what Sub Report_NoData is doing, but what is Sub Detail_Format doing?

  2. #2
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    It seems to be making the control named label invisible if the field control has a null value or making it visible otherwise.
    Last edited by ruirib; 2011-07-29 at 07:04.

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts
    Thanks for your reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •