Report detail not functioning

  • Thread starter Thread starter Brandon Schultz
  • Start date Start date
B

Brandon Schultz

I have no idea why this isn't working but it will not make the label and
text box invisible:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If Me.txtCusComplaintNum = Null Then
Me.txtCusComplaintNum.Visible = False
Me.lblCustomerComplaintNumber.Visible = False

Else: Me.lblCustomerComplaintNumber.Visible = True
Me.txtCusComplaintNum.Visible = True
End If

End Sub

If you do a ?Me.txtCusComplaintNum in the debug window it indeed shows the
value null. I have written similiar snibits of code and they function
properly. Am I missing something simple? I get no errors.

Thanks,

Brandon Schultz
 
Nothing is ever equal to Null, Brandon, because Null is an unknown value. If
something is unknown, then the result of any comparison with that unknown
value is also unknown.

Use the IsNull() function instead of the = operator to test for Null values.
 

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

Back
Top