John Ruff
papparuff at attbi.com
Tue Apr 15 08:39:45 CDT 2003
You can use the report's OpenArg to determine if the checkbox is checked on the form, then use the Format Event in the report's Detail section to determine if the form's checkbox has been checked, and if it has, change the backcolor of the detail section. So, Code to set the OpenArgs on the form that opens the report. DoCmd.OpenReport"MyReport", OpenArgs:=MyCheckBox In the Format Event of the report's detail section; Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.OpenArgs = True Then ' Make the backcolor of the ' Detail Section the color ' green Detail.BackColor = vbGreen End If End Sub John V. Ruff - The Eternal Optimist :-) Always Looking For Contract Opportunities "Commit to the Lord whatever you do, and your plans will succeed." Proverbs 16:3 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Marcus, Scott (GEAE, RHI Consulting) Sent: Tuesday, April 15, 2003 6:13 AM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] Reports Question Frank, The way I do this is to make a color table that stores an image of that color and then lookup this image based on the criteria you mentioned. You can then place a control on the continuous form that displays this image (you can stretch it to fit and send it to the back to make it cover the entire background). Scott -----Original Message----- From: Frank Tanner III [mailto:pctech at mybellybutton.com] Sent: Tuesday, April 15, 2003 9:07 AM To: Database Advisors Subject: [AccessD] Reports Question I an writing a report that I want to color the detail line a different color based upon an "option" checkbox in a form. Basically, if a box is checked AND the criteria that the checkbox represents is present in the record, it changes the color of that line in the details. For instance. If the checkbox is "flag toll-free numbers" and the record being displayed in the details contains "800" "888" "866" or "877" it will color the record green. How can I do this? I actually have several different check boxes with different criteria, but I'd imagine once one is figured out, it will work the same for all of them. Thank you for your assistance. _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com