Referring to subreport fields in main reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey all.

I'm working in Access 2000 with a main report/sub report. The sub report
lists individual line items for a person (in dollars), and there is a text
box at the bottom that sums up the total. This control is called txtTotal.

On the main report, I want to show that total. So I refer to it using
=[rptSUB_REPORT]!txtTotal. It's behaving oddly, though. If a given person has
only ONE line item, it displays fine. However, if the person has more than
one line item on the sub-report, the main report is only displaying the first
line.

What's frustrating is that txtTotal is a visible control, and it DOES show
the correct total. So for instance -
-------sub report ----------
Account 1 -10
Account 2 -16
Account 3 -10
Total -36 <-- txtTotal - THIS IS WORKING
------ end sub report ----
Total reversals -10 <-- THAT SHOULD BE -36

The numbers involved will always be negative, if that means anything.
Thanks for your help.
 
Thanks. Unfortunately, that still doesn't solve it.

Duane Hookom said:
Try:
=[rptSUB_REPORT]!Report!txtTotal

--
Duane Hookom
MS Access MVP
--

MDW said:
Hey all.

I'm working in Access 2000 with a main report/sub report. The sub report
lists individual line items for a person (in dollars), and there is a text
box at the bottom that sums up the total. This control is called txtTotal.

On the main report, I want to show that total. So I refer to it using
=[rptSUB_REPORT]!txtTotal. It's behaving oddly, though. If a given person
has
only ONE line item, it displays fine. However, if the person has more than
one line item on the sub-report, the main report is only displaying the
first
line.

What's frustrating is that txtTotal is a visible control, and it DOES show
the correct total. So for instance -
-------sub report ----------
Account 1 -10
Account 2 -16
Account 3 -10
Total -36 <-- txtTotal - THIS IS WORKING
------ end sub report ----
Total reversals -10 <-- THAT SHOULD BE -36

The numbers involved will always be negative, if that means anything.
Thanks for your help.
 
File this one under wierd - I moved the subreport from the SSN footer on the
main report to the detail section, and now it works. The text box that was
referring to the subreport is in the SSN footer. I guess Access didn't like
that.

Duane Hookom said:
Try:
=[rptSUB_REPORT]!Report!txtTotal

--
Duane Hookom
MS Access MVP
--

MDW said:
Hey all.

I'm working in Access 2000 with a main report/sub report. The sub report
lists individual line items for a person (in dollars), and there is a text
box at the bottom that sums up the total. This control is called txtTotal.

On the main report, I want to show that total. So I refer to it using
=[rptSUB_REPORT]!txtTotal. It's behaving oddly, though. If a given person
has
only ONE line item, it displays fine. However, if the person has more than
one line item on the sub-report, the main report is only displaying the
first
line.

What's frustrating is that txtTotal is a visible control, and it DOES show
the correct total. So for instance -
-------sub report ----------
Account 1 -10
Account 2 -16
Account 3 -10
Total -36 <-- txtTotal - THIS IS WORKING
------ end sub report ----
Total reversals -10 <-- THAT SHOULD BE -36

The numbers involved will always be negative, if that means anything.
Thanks for your help.
 
Back
Top