Software

Conditionally underline values in an Access report

Make your Access reports easier to read by setting up conditional underlining. With conditional underlining, you can make information within certain parameters jump out in the report, specifying fields where certain criteria are met.

Detail reports become easier to read if the information you are looking for is highlighted in some way. For example, suppose you would like to know which of your employees worked more than 40 hours last week. You could search down a listing of employees and their hours and mark it yourself, or you could have Access do it for you. Follow these steps:

  1. Open the Employee Hours Report in Design mode.
  2. Click the Line tool in the Toolbox.
  3. Click and drag to draw a line under the Hours field in the Detail section.
  4. Right-click the line and select Properties.
  5. Click the All tab and click in the Name box and type FullTimeLine.
  6. Click in the Border Width Box and select 6pt.
  7. In the Database window, click Macros under Objects.
  8. Click the New button.
  9. Right-click the Macro title bar and select Conditions.
  10. Click in the first Condition cell and type [Hours]>39.
  11. Click in Item under Action Arguments and type [FullTimeLine].[Visible].
  12. Click in the Expression Box and type Yes.
  13. Click in the next Condition cell and type [Hours]<40.
  14. Click in Item under Action Arguments and type [FullTimeLine].[Visible].
  15. Click in the Expression Box and type No.
  16. Close and save the macro as Prtline.
  17. Open the Employee Hours Report in Design mode.
  18. Right-click a blank area of the Detail section and click Properties.
  19. Under the Event tab, click in the On Format property box and select Prtline.

Miss a tip?

Check out the Microsoft Access archive, and catch up on our most recent Access tips.

Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.

Editor's Picks