View Full Version : Changing Properties in Report


neo19
02-24-2005, 07:01 AM
I have a report which shows several items and their prices for each customer. For some of my subreports if the items and prices are all the same then i have them only display the sum of the prices and the item using an IIF function and Hide Duplicates = Yes. My problem is that if I have several different items display then but their prices are the same then the descriptions will show up but only the first price will. So I'll have 3 different items but only one price show up on the report. I've tried using the OnFormat event to change the hide duplicates setting if this situation comes up but I can only read the hide duplicates setting, I can't change it. Does anyone know how I can change this setting?

llkhoutx
02-24-2005, 10:20 AM
Access Help has the following example:

intCurVal = Me!CategoryName.HideDuplicates

I tried to change the Hideduplicates value for a report textbox on the OnFormat ever and received Error No. 2448, "You can't assign a value to this object."

One way to do it if the design veiw of the report is available: Open the report in design view & hidden, change the appropriate HideDuplicates, then (without saving te change) open the report in normal or preview view. On closing the report, you'll be prompted to save it. You can probably avoid the prompt by toggling SetWarnings. Or, close the report with code and use acSaveNo option.