The following example was based on a very simple table with 3 columns. The report based on the table "hides" the d3 field if the data field is visible. I placed the code in the on-format event of the detail section. I think you can even skip printing a line with these events - haven't used it to do that in a few years though.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull([data]) Then
d3_data.Visible = False
Else
d3_data.Visible = True
End If
That is what I tried to do early on but for some reason I kept getting an run time error saying, "The object doesn't have access to object or method". The code I used is below:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim result As Boolean
result = IsNull(txtSearchLineItemSSNResult.value)
If (result = False) Then
txtSearchLineItemSSNResult.Visibal = True
Else
txtSearchLineItemSSNResult.Visibal = False
End If
End Sub
It keeps caughing on the 1st instance of the .Visibal method
I may be completely wrong, but I believe the problem is just in the spelling of the method - I am betting if you change Visibal to Visible that will remove your problem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.