Can't force subform to save record of zeros

carlnewton

Registered User.
Local time
Today, 14:35
Joined
Jan 10, 2008
Messages
19
- I have a form with five subforms, each with it's own table (recordsource). - Each subform is linked to the same Primary Key on the Parent.
- The fields in the five subforms each have the default data value set to 0.

My problem is that I would like each subform to save those zeros in their respective table records even if there is no other data in that record. My customer wants to see those zeros on the reports.

How can I force each subform to save it's record of zeros?

I can't use the Parent form 'AfterUpdate' event.
 
I wouldn't implement this by introducing spoof records in the related tables. I'd customize the report to always display a summary of data in the related tables, which would show the requisite zero if no records are present.
 
Thanks for the reply. I'm working with 2007, but it has to be compatible with 2003. How would you customize the report to always show zeros if there is no record? At the moment, the report(s) will show those fields to be blank.
 
I'm not a report wiz, but what I'd try for is to have a section summary for each of your 5 child tables, and for each one to sum its 'data' field. If there are no records this should sum to zero.
Another possibility--if you show these items as subforms--is maybe you need a handful of subreports. Make sure each of those shows a zero if there are no records.
I just don't recommend creating spoof data to jig a report. It's like fixing your roof with toothpicks & bubble gum. It might work for this light rain, but when the sh*t really hits the fan I think you'll be wishing you fixed it properly.
Cheers,
 
I'm not familiar with that approach. Would you please describe it? Underlying sources are queries.
 
If you look at the link there's an image of how it was applied and it explains what it does.
 
Sorry, I didn't notice that you provided a link in your last post. Thanks very much.
 

Users who are viewing this thread

Back
Top Bottom