On Format

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

I want to display an object (rectangle or something else)
on a report when a value of a field is a specified value.

I know you have to add some code to the On Format proerty
in the reports Detail section.
I have now the following code (which does not work):

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If Len(Me.[FldProdCode]) = 0 Then
Me![bxProductcode].Visible = True
Else
Me![bxProductcode].Visible = False
End If
End Sub

Can sombody help?
/Rob
 
If the field has nothing in it, it is probably Null. Try:
If Len(Me.[FldProdCode]) = 0 OR IsNull(Me.FldProdCode) Then
 
Thanks! It works...
-----Original Message-----
If the field has nothing in it, it is probably Null. Try:
If Len(Me.[FldProdCode]) = 0 OR IsNull (Me.FldProdCode) Then

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I want to display an object (rectangle or something else)
on a report when a value of a field is a specified value.

I know you have to add some code to the On Format proerty
in the reports Detail section.
I have now the following code (which does not work):

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If Len(Me.[FldProdCode]) = 0 Then
Me![bxProductcode].Visible = True
Else
Me![bxProductcode].Visible = False
End If
End Sub

Can sombody help?
/Rob


.
 
Back
Top