Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Calculated Field in Sub Report
Mark Pierce 
     
3 years ago
I have a report(rpt1) with several sub reports. One of the sub reports(rpt2a) has its own sub report(rpt2b). In report(rpt2a) there is a field that is used in the sub report(rpt2b) to calculate a value.

When the report(rpt2a) is opened in report view the calculated field in the sub report(rpt2b) works.

When the report(rpt2a)(rpt2b) is added to the main report(rpt1) the calculated field in (rpt2b) no longer works.

Any ideas?

I will attached a picture.
Mark Pierce OP  @Reply  
     
3 years ago

Scott Axton  @Reply  
        
3 years ago
Would you please show us you reports in design mode?  They #Type! is indicating that the data type is being changed in the calculation.

While it may look ok and display ok in the one as text if you are doing any calculations it needs to be a number data type.
The culprit could be formatting changing it.  With out seeing it, it is difficult to tell based on what you provided.
Mark Pierce OP  @Reply  
     
3 years ago

Mark Pierce OP  @Reply  
     
3 years ago

Mark Pierce OP  @Reply  
     
3 years ago
PreTop is the name of the calculated field and it is set as a Number, double .
Kevin Yip  @Reply  
     
3 years ago
The main report decides how you should reference the controls.  If you change the main report, as you did from rpt2a to rpt1, the references likely have to be changed, and that may be why you get the errors.  For instance:

If rpt2a is the main report and rpt2b the subform, a control in rpt2b is referenced as:

     rpt2a!rpt2b.Report!Control1

But if rpt1 is the main report, rpt2a the subform, and rpt2b the subform inside rpt2a, then the same control in rpt2a should be referenced as:

     rpt1!rpt2a!rpt2b.Report!Control1

Check if this is the reason for the error.
Mark Pierce OP  @Reply  
     
3 years ago
That was the issue Kevin, thanks so much for you help!
Also thanks Scott for telling me the info needed!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 2:02:56 AM. PLT: 2s