code not working

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
 
J

John W. Vinson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top