code not working

  • Thread starter Thread starter Marianne
  • Start date Start date
M

Marianne

Can someone tell me what I have done wrong? I appreciate your help!

I want the groupfooter1(Dept_Division group footer) to not display only if
the field Dept_Division = is blank.

I put this code in the on format event of the groupfooter1

If Reports!rpt_Aging!Dept_Division = Null Then
Me.GroupFooter1.Visible = False
Else
Me.GroupFooter1.Visible = True
End If
 
Can someone tell me what I have done wrong? I appreciate your help!

I want the groupfooter1(Dept_Division group footer) to not display only if
the field Dept_Division = is blank.

I put this code in the on format event of the groupfooter1

If Reports!rpt_Aging!Dept_Division = Null Then
Me.GroupFooter1.Visible = False
Else
Me.GroupFooter1.Visible = True
End If

NULL is a funny beast. It means "This value is unknown, unspecified,
ambiguous". As such nothing is equal to NULL, or for that matter UNequal to
Null.

To catch cases where Dept_Division is NULL *or* contains a zero length string
(they're different) try

If Reports!rpt_Aging!Dept_Division & vbNullString = vbNullString Then
 
Back
Top