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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Subreport to be same as parent report detail section

Status
Not open for further replies.

PROXI

Vendor
Sep 16, 2003
136
US
Hello all,

I have been using the following code to format my reports:

Const vbLightGrey = 14540253

If Me.CurrentRecord Mod 2 = 0 Then

Me.Section(acDetail).BackColor = vbWhite

Else

Me.Section(acDetail).BackColor = vbLightGrey

End If


It works great. I now have a report that in the middle of the detail section has a subreport. Is there a way to make this code apply to the subreport as well. When I put the above code in the detail section of the subreport it turns them all grey. Any ideas would be appreciated.

Shadd

Thanks,

PROXI
 
I tried this by creating the subreport as you showed for the lines being grey/white/grey/white etc. Tested it and it worked great. Then I put the subreport into another report, tested again and it work great.

I have re-read your post, and I am not clear how or where you put the code for the subreport. Could you explain further?
 
Solved the problem... Instead of using the subreport, I figured out how to use a merge query instead.

Thanks,

PROXI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top