A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Unbound text



 
 
Thread Tools Display Modes
  #1  
Old August 6th, 2009, 06:27 AM posted to microsoft.public.access.reports
Dom
external usenet poster
 
Posts: 82
Default Unbound text

I tried to send this message before, but I think I've failed miserably.
Apologies if the same question apperas twice.

I have a report originated from a query. The query, among other info, lists
products and, next to them, producers. Of course, one producer can have
several products. In the report, I'm willing to show the total number of
products as well as the total number of producers. In the report I run a
=count(*) for the products and get the result I want. However, if I run the
same for producers, I get exactly the same amount, which double counts the
number of producers. I expect less producers than products. To have an
accurate number of producers I have, then, ran a second query listing and
grouping the producers to avoid the double count. However, I cannot make an
unbound text box in the report to read or count the results from this second
query. Can anyone pelase let me know what I'm doing wrong or an alternative
way of doing it?
Thanks,
  #2  
Old August 6th, 2009, 03:06 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Unbound text

Dom wrote:

I tried to send this message before, but I think I've failed miserably.
Apologies if the same question apperas twice.

I have a report originated from a query. The query, among other info, lists
products and, next to them, producers. Of course, one producer can have
several products. In the report, I'm willing to show the total number of
products as well as the total number of producers. In the report I run a
=count(*) for the products and get the result I want. However, if I run the
same for producers, I get exactly the same amount, which double counts the
number of producers. I expect less producers than products. To have an
accurate number of producers I have, then, ran a second query listing and
grouping the producers to avoid the double count. However, I cannot make an
unbound text box in the report to read or count the results from this second
query. Can anyone pelase let me know what I'm doing wrong or an alternative
way of doing it?



A better way is to have the repot group (View menu - Sorting
and Grouping) on the producer field. Put a text box (named
txtProducerCounter) in the group header or footer setion.
Set the text box's expression to =1 and RunningSum to Over
All. Then a report footer text box can display the number
of producers by using the expression =txtProducerCounter

--
Marsh
MVP [MS Access]
  #3  
Old August 7th, 2009, 02:44 AM posted to microsoft.public.access.reports
Dom
external usenet poster
 
Posts: 82
Default Unbound text

HI Marshall,

it didn't work. The txtproducercounter box showing =1 and running the sum
over all does show the number of producers as you said it would. However,
when I create the text box in the report header and make it equal to
txtproducercounter it shows 1 and not the sum of all 1's. Does it need to be
in the report footer to have the calculation happening or am I missing
something else?

Dom

"Marshall Barton" wrote:

Dom wrote:

I tried to send this message before, but I think I've failed miserably.
Apologies if the same question apperas twice.

I have a report originated from a query. The query, among other info, lists
products and, next to them, producers. Of course, one producer can have
several products. In the report, I'm willing to show the total number of
products as well as the total number of producers. In the report I run a
=count(*) for the products and get the result I want. However, if I run the
same for producers, I get exactly the same amount, which double counts the
number of producers. I expect less producers than products. To have an
accurate number of producers I have, then, ran a second query listing and
grouping the producers to avoid the double count. However, I cannot make an
unbound text box in the report to read or count the results from this second
query. Can anyone pelase let me know what I'm doing wrong or an alternative
way of doing it?



A better way is to have the repot group (View menu - Sorting
and Grouping) on the producer field. Put a text box (named
txtProducerCounter) in the group header or footer setion.
Set the text box's expression to =1 and RunningSum to Over
All. Then a report footer text box can display the number
of producers by using the expression =txtProducerCounter

--
Marsh
MVP [MS Access]

  #4  
Old August 7th, 2009, 04:29 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Unbound text

Dom wrote:
it didn't work. The txtproducercounter box showing =1 and running the sum
over all does show the number of producers as you said it would. However,
when I create the text box in the report header and make it equal to
txtproducercounter it shows 1 and not the sum of all 1's. Does it need to be
in the report footer to have the calculation happening or am I missing
something else?



It has to be in the report footer section. In some versions
of Access (A2003?) the report header can refer to the report
footer text box and get the total, but trying to refer to a
value before it has been calculated has always been an iffy
thing.

--
Marsh
MVP [MS Access]
  #5  
Old August 7th, 2009, 04:49 AM posted to microsoft.public.access.reports
Dom
external usenet poster
 
Posts: 82
Default Unbound text

Thanks, Marshall. It worked. I created a text box in the footer and another
one in the header, with the herader box referring to the footer one.
Thanks so much.
Dom

"Marshall Barton" wrote:

Dom wrote:
it didn't work. The txtproducercounter box showing =1 and running the sum
over all does show the number of producers as you said it would. However,
when I create the text box in the report header and make it equal to
txtproducercounter it shows 1 and not the sum of all 1's. Does it need to be
in the report footer to have the calculation happening or am I missing
something else?



It has to be in the report footer section. In some versions
of Access (A2003?) the report header can refer to the report
footer text box and get the total, but trying to refer to a
value before it has been calculated has always been an iffy
thing.

--
Marsh
MVP [MS Access]

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.