VBA on an access report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • trixxnixon
    New Member
    • Sep 2008
    • 98

    #1

    VBA on an access report

    VBA doesnt seem to work exactly the same way as it does on a form.
    i have a bound field on a report "name". the report is grouped by this field.
    For the records where there is no data in the name field, it reports as blank("", or IsNull) i want this field to say "Not Assigned" when there has not been a name entered into the table . i can not for the life of me get the .visible = true or false to work on a on a field no a label.


    any ideas what i may be doing wrong?
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Try the following code in the Format() Event of the GroupHeader Section of [Name]:
    Code:
    Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    If IsNull(Me![Name]) Then
      Me![Name].Visible = False
    Else
      Me![Name].Visible = True
    End If
    End Sub

    Comment

    Working...