Dynamically formatting reports

  • Thread starter Thread starter Sue
  • Start date Start date
S

Sue

Hi,

I am trying to shade an entire row in my detail section
of my report if one of the controls is null/empty (the
control is named 'typeOfSpace'). The code I came up with
is below. I get a run-time error that reads "Object
Required" and I am not understanding why I need an object
to do this. Any thoughts are greatly appreciated.

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If typeOfSpace Is Null Then
Me.Detail.BackColor = 65280
Else
Me.Detail.BackColor = 8454016
End If
End Sub
 
Hi,

I am trying to shade an entire row in my detail section
of my report if one of the controls is null/empty (the
control is named 'typeOfSpace'). The code I came up with
is below. I get a run-time error that reads "Object
Required" and I am not understanding why I need an object
to do this. Any thoughts are greatly appreciated.

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If typeOfSpace Is Null Then
Me.Detail.BackColor = 65280
Else
Me.Detail.BackColor = 8454016
End If
End Sub

There is a control named [typeOfSpace] in the report Detail Section?

If IsNull([typeOfSpace]) Then
Me.Section(0).BackColor = 65280
Else
Me.Section(0).BackColor = 8454016
End If
 
Thank you Fred, that worked!

-Sue
-----Original Message-----
Hi,

I am trying to shade an entire row in my detail section
of my report if one of the controls is null/empty (the
control is named 'typeOfSpace'). The code I came up with
is below. I get a run-time error that reads "Object
Required" and I am not understanding why I need an object
to do this. Any thoughts are greatly appreciated.

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If typeOfSpace Is Null Then
Me.Detail.BackColor = 65280
Else
Me.Detail.BackColor = 8454016
End If
End Sub

There is a control named [typeOfSpace] in the report Detail Section?

If IsNull([typeOfSpace]) Then
Me.Section(0).BackColor = 65280
Else
Me.Section(0).BackColor = 8454016
End If
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top