Do Calculation In Form Or Query (1 Viewer)

AJR

Registered User.
Local time
Today, 19:39
Joined
Dec 22, 2012
Messages
59
Hi

General question.

If I want to populate a text box in a form, whose RecordSource is a query, with the result of a calculation.

For example:

Query Fields are [Quantity] and [Price] and I want the form to show [Quantity], [Price] and [TotalPrice].

Does it make any difference if I put an expression in the Query to arrive at [TotalPrice] or do it in the form?

If so, which is better?

Thanks

A/R
 

RuralGuy

AWF VIP
Local time
Today, 05:39
Joined
Jul 2, 2005
Messages
13,826
It probably does not make a difference but I prefer to do my calculations in the query. It *would* make a difference if you are using a static query since they will do some strategy in advance of running the query so there will be a perhaps slight speed difference.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 04:39
Joined
Aug 30, 2003
Messages
36,126
I agree with RG. Two more advantages: it can force the processing to the server, and it allows you to sum the calculated field easily in forms and reports.
 

Users who are viewing this thread

Top Bottom