Re: How do I 'Highlight' a record in a report

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Al,

Good Day. I tried using your example, but could not find the OnFormat event
on my report. I clicked on the properties form which has all the events
listed for the rerpot and fields on the report. Does this apply to Office
2007? If so, where do I go?

"Al Campagna" wrote:

Ross,
Use the OnFormat event of the report to check for NewProduct = True, and
highlight it.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If NewProduct = True Then
SomeField.BackColor = vbYellow
Else
SomeField.BackColor = vbWhite
End If
End Sub
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"Ross" <ross@xxxxxxxxxxxxx> wrote in message
news:473d178a$1@xxxxxxxxxxxxxxxxxxxxxxx
I have a database that catalogues our products and from that we produce a
Customer Catalogue.
We have now decided to "highlight" the New products in the report to make
it easier for our customer to see what is New, for example:

Code Desc Price
12345 Widget 1 2.50
42548 Widget99 6.50 (ticked in database as New Product needs to
be highlighted)
85421 Widget21 6.40

I have tried different code, on Format or On Print change Backcolour to
Grey, but it does not work.

Any help would be appreciated.

Ross




.



Relevant Pages

  • Re: How do I Highlight a record in a report
    ... If NewProduct = True Then ... Customer Catalogue. ... We have now decided to "highlight" the New products in the report to make ...
    (microsoft.public.access.reports)
  • Re: Report Page(s) Count
    ... in the ReportHeader section OnFormat event, ... dim s as string ... Now your table will be populated when you get to the report ...
    (microsoft.public.access.formscoding)
  • Re: Event Help
    ... A report does not have control level "events"... ... The OnFormat event of a report section is the place to apply any ... after update event because if I did have one of those I could attach the ... [restock level].ForeColor = 255 ...
    (microsoft.public.access.tablesdbdesign)
  • Re: problem finding conditional formatting!
    ... but whilst it is triggered by the OnFormat event on the Report, ... trigger when I look for the report from the User Menu. ... >> I told you how to find a control's conditional formatting, ...
    (microsoft.public.access.reports)
  • Re: conditional formatting code - 5 objects using 5 variables
    ... just to clarify that this is a REPORT and not a Form. ... I'm using the OnFormat event for the Detail section. ... I set the format on the controls in the Report to show @;"no entry" so that it would visually show something other than blank. ... don't get the correct colors for the values. ...
    (microsoft.public.access.formscoding)