Charlotte Foust
cfoust at infostatsystems.com
Tue Apr 15 13:33:45 CDT 2003
Sorry, John, but reports didn't get an OpenArgs property until 2002. Charlotte Foust -----Original Message----- From: John Ruff [mailto:papparuff at attbi.com] Sent: Tuesday, April 15, 2003 5:40 AM To: accessd at databaseadvisors.com Subject: RE: [AccessD] Reports Question 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 <snip>