Results 1 to 6 of 6
  1. #1
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071

    Report Back Color formatting

    I have an Access 2010 Report Everything works perfectly. The user has requested that I color code the report to make it easier to read.

    I have 2 Group Headers and 2 Group Footers The Detail section is suppressed.
    the first group is based on the PCP
    The second group is based on the member.
    The HCC is the member group footer. A Member may have 0 to many HCC's and I'm accumulating those in the detail section so they display on 1 line.

    So the report looks loosely like this

    Dr. Smith
    Jim Jones
    HCC
    Bill Smith
    HCC 19, 20, 21
    John Doe
    HCC
    Dr Smith 3 members

    So the 2 lines for Jim Jones should have not be grayed
    the 2 lines for Bill Smith should be grayed
    the 2 lines for John Doe should not be grayed.

    In the on format event of the member group header I have the following;

    If blnshadow Then
    Me.MBRHDRFNAME.BackColor = RGB(255, 255, 255)
    Else
    Me.MBRHDRFNAME.BackColor = RGB(220, 220, 220)
    End If



    In the on format event of the member group footer I have the following:
    Me.MBRFTRFNAME.BackColor = Me.MBRHDRFNAME.BackColor
    blnshadow = Not blnshadow


    this is not giving me the results I want.

    In the group Header the back Properties are as follows:
    back color = background 1
    Alternate back Color = Bacground 1,Darker 5%

    the group footer shows the same values for those properties but the back grounds don't come up right that way either.

    Any help is appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    The proper effect is not displayed in PrintPreview? Format event only executes in PrintPreview or straight to printer.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    No it is not. the issue is that the group header and group footer are for the same number so both should have the same background but sometimes it's the group header sometimes it the footer sometimes it's neither. The detail section is suppressed. I think it's because even though the detail section visible property is set to no it is still included when determining the background color and the records missing the background is because the detail lines are the ones being highlighted. I've reworked the report and included all of the fields in the group footer eliminating the header. Now I have the following code in the format event of the group footer:

    If blnbackground Then
    me.mbrfooter.backcolor = RGB(220,220,220)
    Else
    me.mbrfooter.backcolor = RGB(255,255,255)
    End If
    me.txtmembid.backcolor = me.mbrfooter.backcolor
    me.txtmember.backcolor = me.mbrfooter.backcolor
    me.txtbirth.backcolor = me.mbrfooter.backcolor
    me.txthcc.backcolor = me.mbrfooter.backcolor
    blnbackground = not blnbackground

    This is running now I'll let you know if it works.

  4. #4
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Well it's working a little better but the backcolor is still off. Sometimes it's just the way I want it. Sometimes the grayed lines are a little lighter and sometimes the not grayed lines have the lighter gray. It's better but still off.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    I tested this with Detail section visible and not visible. Works great. I would have to analyse your project directly to help further.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,071
    Unfortunately this is a Medical Group and contains Patient Information. Most of the data comes from a SQL Server Database called EZ-Cap. I've been given a new project with higher priority when I get a chance I'll see what I can do to put test data into the DB and post it back. Thanks for your help anyway.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-02-2011, 03:15 AM
  2. Alternate Back Color not working properly
    By kolarbr in forum Access
    Replies: 7
    Last Post: 08-30-2011, 10:16 AM
  3. Back color update issue
    By GraemeG in forum Programming
    Replies: 3
    Last Post: 03-21-2011, 11:32 AM
  4. Conditional Formatting date due color
    By Desstro in forum Programming
    Replies: 1
    Last Post: 12-08-2010, 11:12 PM
  5. Replies: 0
    Last Post: 11-13-2009, 10:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums