Yes, it is possible, but you need to change the record source of your
report
to include the other table. You could do it without adding the other
table,
but it would be very slow because it would have to do database fetches
for
every row.
You do that with a query that joins the two tables on itemno. Then you
don't need a function. All you would need in the control source of the
price
would be:
=[units] * [itemprice]
--
Dave Hargis, Microsoft Access MVP
:
Thank you for your answer
I want to use a function like You suggest. If I make a function, how
do I
return the value?
My report is from a tabel called post. In this I have fields (itemno,
units). I have an other tabel called items with fields (itemno,
itemprice)
My function CalcPrice() must return units * itemprice.
Is this possible?
Regards
Jens
"Klatuu" <
[email protected]> skrev i en meddelelse
On both reports and forms, the Control Source property of a control
determines what is displayed in the control. To show a calculated
value,
you
just put the calculation in the control source property. This can
be a
direct calculation or if it is complex, you can use a function. To
use
a
function, it has to be preceded with an equal sign. For example, if
you
had
a function you named CalcPrice, it would be:
=CalcPrice()
You can pass parameters to it as well.
--
Dave Hargis, Microsoft Access MVP
:
Hello
I'm trying to make a report in which I want to print a price that
is
calculated from other fields. Is that possible and how?
Regards
Jens