Conditional formatting in unlinked subreport

G

Gert Wieland

Hi all,

In Access 2007, I am using a main report which has three sub reports.
The main report shows some details per salesman, two of the subreports
are linked to the main report and show some details for this salesman,
too.

The third subreport shows a ranking of all salesmen, so this one is
not linked to the main report.

So far, the reports show exactly what I want.

Now I would like every salesman to locate himself easily in the
ranking (i. e. the unlinked third report).

Therefore I would like to do the following:

In the report for the salesman A, his results in the ranking should
have a colored background (e. g. yellow), in the report for the
salesman B, B´s results should have the yellow background, etc..

My question is, how can I address the properties of a control in a sub
report, triggered by the event "OnOpen" from the main report.

So far, I have been trying this:

Reports("MainReport").Section(acDetail).Controls("SubReport").Controls
("FirstName").BackColor = RGB(255, 0, 0)
 

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