Hi,
My calculated fields do not exists in the table, I need to calculate on the
fly.
So I cannot link the text box/label to the recordset.
> On Tue, 22 May 2007 11:01:23 +1000, "Alan T"
> <alanpltseNOSPAM@yahoo.com.au>
[quoted text clipped - 12 lines]
>
> John W. Vinson [MVP]
Rick Brandt - 22 May 2007 12:47 GMT
> Hi,
> My calculated fields do not exists in the table, I need to calculate
> on the fly.
> So I cannot link the text box/label to the recordset.
That is not what John suggested. A TextBox can have an expression as its
ControlSource and thus display a value that has nothing to do with the form's
RecordSource.

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
John W. Vinson - 23 May 2007 04:00 GMT
>My calculated fields do not exists in the table, I need to calculate on the
>fly.
Then do so.
You can set the Control Source of a textbox to
=(([FieldA] + [FieldB]) / IIF([FieldC] > [FieldD], [FieldC], [FieldD])
or any other expression that you choose.
John W. Vinson [MVP]
Alan T - 28 May 2007 03:53 GMT
I understand it but my calculated fields depends on fields of other tables.
I need to run a query may have a SUM(..) in the SELECT part.
> On Tue, 22 May 2007 16:55:24 +1000, "Alan T"
> <alanpltseNOSPAM@yahoo.com.au>
[quoted text clipped - 13 lines]
>
> John W. Vinson [MVP]
John W. Vinson - 28 May 2007 04:55 GMT
>I understand it but my calculated fields depends on fields of other tables.
>I need to run a query may have a SUM(..) in the SELECT part.
You can use the builtin DSum() function, or create a stored query and use
DLookUp to retrieve a value from that query. You don't say anything about the
nature of the calculation so I really can't be much help other than that!
John W. Vinson [MVP]