Like I said, a Thanks post indicates that your problem is
solved and further postings are not needed. Not saying
thanks (or better to say that the problem was solved and how
you solved it) leaves the thread kind of hanging with
everyone wondering if you need more help, got tired of it
all, had an accident, just don't care or ....
I don't use the (IMO dumb) web interface for newsgroups. I
use Forte Agent, which is designed around newsgroups and
email, so I have no idea what features the web interface has
that might help keep track of your threads. Even Outlook
Express has decent newsgroup features. In Agent, I just
leave my own posts marked as unread for a week and use the
Next Unread key to zip through looking for a question or
followup where I might be able to help.
--------------------------------------------------------------------------------------
You can use any record source field in a form/report
aggregate function regardless of how the field got into the
query. What you can not use is a control name from the
form/report. For example, if your record source query has
quantity and price fields and the price field is calculated
from some other info (e.g. base price, preferred customer,
etc), the form/report will see price as a field, no problem.
For example, if the detail section of the report has a [line
item total] text box with the expression =qty * price, the
form/report footer grand total text box can not use the
expression =Sum([line item total]). Instead, it can use
the expression:
=Sum(qty * price)
because qty and price come from the record source query.
--
Marsh
MVP [MS Access]
Thank you for replying again, I take your point on bandwidth does that mean i
cant say thanks. How can i source the original values if my form is based on
a query would i need to use a dlookup. Sorry about the Dale bit he helping
with another problem. One last bit of waste bandwidth. How do i keep track of
my posts. I have asked microsoft but they not help. I find a post then click
my name and seach for recent posts but not ideal. Thanz
Marshall Barton said:
When you post a simple thanks to a post, it means that you
have solved your problem and no further discussion is
needed. A you're welcome reply does not add any value to
the thread and is considered a waste of bandwidth.
To your real problem. The aggregate functions (Count, Sum,
Avg, etc) are unaware of controls on a form/report (and
calculated fields in the same query) They ony know about
fields in the form/report's record source table/query. In
other words, you can not use things "derived from calculated
fields in my query", they must actually be straight from the
query. Use the expressions that were used to derive the
values.
TinMan said:
Sorry i forgot to post my expression though it the same as yours
=Avg([Total Miles] / [Total Ltrs]). Though, like i say, it throws up the
parameter dialog box asking for a value for [Total Miles] then [Total Ltrs]
or LGP if i put
=Avg([LPG]). Both fields are derived from calculated fields in my query but
each have the record source from the query so dont undertand why it asking
for values when they there. I have created a footer but i dont get an #error
or #Name just a blank text box. Can you help me figure it out Dale???.
Incidently, this not the 1st time you help me. I needed a parameter date
query to find conflicting holiday requests by staff few months ago and you
got it spot on. I Thanked you but got no reply. But Thanx again. It actually
pretty good!!