Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color in reports

Status
Not open for further replies.

varich

Technical User
Aug 26, 2009
17
US
I have a report that lists people sorted by a status code. I need to have a color separator line between the different groups. I can I accomplish this?
 
This is a bit complicated. The end users are switching from using an Excel spreadsheet to an Access form and report. These users had a design criteria that demanded the new Access report mimic the old Excel Report in appearance.

The report is a transfer list used throughout the day. People are added to the list via a form, and removed from that list. Basically, the list is laid out with these column headers, which are fields on the input form:
Date Admitted / Person Data / PCP / BedType / Fee Pay, etc., etc, and then finally, List Status

Then below this in a grid are the entries themselves. They are grouped by list status first, then date then time. The list status is obtained via a drop down box on the input form.

Does this make sense?
 
Yes, there is a table that holds the 7 list status codes.
 
Is there a table storing
varich said:
Date Admitted / Person Data / PCP / BedType / Fee Pay, etc., etc, and then finally, List Status
Have you found the sorting and grouping dialog? Did you use it? Did you add a group header for status? Did you put a colored line in it? Isn't this what you want?

Duane
Hook'D on Access
MS Access MVP
 
Well, we are getting there. Perhaps I omitted that those on the list that are under "Admitted" would have yellow line, those that are "En route" would have a green line etc. This method, putting in the header only lets me add on color line between each list status type, not a separate color for certain "high priority" list status types.
 
Ok, I guess I missed the specification about a different color depending on the status value. I would add a numeric long field to the "table that holds the 7 list status codes." Use this field to store the color value you want for the line. 255= red, 65535= yellow....

Bind the new [StatusColor] field to a control in the Group Header section.

Then add some code to the On Format event of the section
Code:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    Dim intHeight As Integer
    intHeight = 60
    Me.Line (0, 0)-Step(Me.Width, intHeight), Me.StatusColor, BF
End Sub

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top