conditional formatting in reports

I

Iain

Hi,

Can anyone let me know if its possible to use conditional
formatting in reports, but where the appearance of one
control is based on that of another.

I can do this in a form, using the OnCurrent property, and
writing a basic If..Then...

Is it possible to do something similar in a report? (i can
only see the Format > Conditional Formatting dialogue box
which only seems to let you change the control based on
the content of that control.

Hope that makes some sense,

Cheers,
Iain
 
R

Rick Brandt

Iain said:
Hi,

Can anyone let me know if its possible to use conditional
formatting in reports, but where the appearance of one
control is based on that of another.

I can do this in a form, using the OnCurrent property, and
writing a basic If..Then...

Use the same strategy using the OnFormat event of the section where the controls
reside on the report.
 
I

Iain

ok - tried that, and had this :

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If [Fasttrack] = True Then
[Development].ForeColor = 205
Else
[Development].ForeColor = 8388608
End If
End Sub

which gave the error message :

Compile Error - Method or data member not found

Any ideas?

Cheers,
Iain
 
R

Rick Brandt

Iain said:
ok - tried that, and had this :

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If [Fasttrack] = True Then
[Development].ForeColor = 205
Else
[Development].ForeColor = 8388608
End If
End Sub

which gave the error message :

Compile Error - Method or data member not found

Do you have controls on the Report with those names?
 
I

Iain

ah - they are the controls - do I need to put in the
report name, ie

If [REPORT NAME].[Fasttrack] = True Then
[REPORT NAME].[Development].ForeColor = 205

etc

Iain
-----Original Message-----
Iain said:
ok - tried that, and had this :

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If [Fasttrack] = True Then
[Development].ForeColor = 205
Else
[Development].ForeColor = 8388608
End If
End Sub

which gave the error message :

Compile Error - Method or data member not found

Do you have controls on the Report with those names?


.
 
R

Rick Brandt

I always just use the Me.[ControlName] syntax. (or Me![ControlName])

Iain said:
ah - they are the controls - do I need to put in the
report name, ie

If [REPORT NAME].[Fasttrack] = True Then
[REPORT NAME].[Development].ForeColor = 205

etc

Iain
-----Original Message-----
Iain said:
ok - tried that, and had this :

Private Sub Detail_Format(Cancel As Integer, FormatCount
As Integer)
If [Fasttrack] = True Then
[Development].ForeColor = 205
Else
[Development].ForeColor = 8388608
End If
End Sub

which gave the error message :

Compile Error - Method or data member not found

Do you have controls on the Report with those names?


.
 

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