Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Passing values from subreport to main report

Posted on 2008-06-19
13
Medium Priority
?
347 Views
Last Modified: 2013-11-28
I have developed a main form with several sub forms to pull together cost data for a job.
Specifically, the subreports include labor cost, parts cost, invoice totals, etc.

When, I try to pass the subtotal value to the main report, I get #name? error message.  I have successfully created 2 other similar reports so I am really lost.

I have tried moving the subreports to different locations within the main report with the same result each time
0
Comment
Question by:CindySt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
13 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21825213
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21825220
0
 
LVL 11

Expert Comment

by:RgGray3
ID: 21825285
One good paper on referencing controls on forms and subforms is located at   http://support.microsoft.com/kb/209099

But the best reference can be found at

http://www.everythingaccess.com/tutorials.asp?ID=Referring-to-properties-and-controls-from-a-form%2Freport

Trick is to create the totals in the footer of the form and set a control on the main form to be equal to the control in the footer that has the value

0
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

Author Comment

by:CindySt
ID: 21825397
I said form/ subform, when I really meant report/ subreport.

I had Microsoft article 208835.  I am doing exactly what it says and still no luck.
0
 
LVL 11

Expert Comment

by:RgGray3
ID: 21825424
You can download an excellant copy of the doc here

http://www.mvps.org/access/downloads/Syntax_for_subs.zip

What can I say about this doc...
I have been using Access since Version 1.1....  I always keep a copy handy...

rich
0
 

Author Comment

by:CindySt
ID: 21825431
There are 5 sub reports.  Each query for the sub reports is matching the job cost in the main report.  Could there just be too many things running at once.

In main report:  Query asks [Enter Work Order number]

Each query in all subreports using the report control WOnumber to run the data.

I have made sure that the totals are in the sub report footer.  What am I missing?
0
 
LVL 75
ID: 21826237
" I have developed a main form with several sub forms to pull together cost data for a job.
Specifically, the subreports include labor cost, parts cost, invoice totals, etc."

Sub Forms or Sub Reports ?  Which is it?

mx
0
 

Author Comment

by:CindySt
ID: 21826298
report/ subreport
0
 
LVL 75
ID: 21826339
Sorry, I missed that post.

"When, I try to pass the subtotal value to the main report,"

How are you 'passing' the subtotal value(s) ?

mx
0
 

Author Comment

by:CindySt
ID: 21826447
Subtotal field in Report Footer:  txtInvoiceTotal= sum([InvoiceAmt])
where InvoiceAmt is in the detail section

In the main report a text box with:
[rptInvoiceSub].[Report]!.[txtInvoiceTotal]
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 21826545
You have and extra symbol (!) below

[rptInvoiceSub].[Report]!.[txtInvoiceTotal]
                                     ^

try this:

=[rptInvoiceSub].[Report].[txtInvoiceTotal]

and you need the equals sign also ...

mx
0
 

Author Comment

by:CindySt
ID: 21826655
Thanks!
0
 
LVL 75
ID: 21826659
you are welcome.

mx
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question