Northwind2 caculating invoice line? (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 06:56
Joined
Sep 21, 2011
Messages
15,744
Hi NW2 people,
I just offered the DB as a good example for producing invoices.
The O/P was questioning why the calculation was done on the form and not the table, where he was initially doing it with calculated fields.
I replied, no idea, but would ask a developer.
I did say that I would do it that way as well, but then I have only started using a db version with calculated fields (I believe?, 2019), so would do it the old fashioned way. :)

TIA
 
We followed the fundamental principle that calculated values should not be stored in tables. They are calculated as needed for display in forms and reports.

But perhaps there is more to the question than that. Was there some other consideration involved in the original question?
 
Not sure TBH George,
Here is what was posted to my link. I can post the link to the thread if required.

I dare say, if I started with a db that supported calculated fields, I might have asked the same question. :)
Thank you all. sorry for the confusion, but you guys helped me a lot. the northwind2 database is a great help i can take the idea and implant it on my database. I think it will work the best the order form is really good, and it is what I'm looking for. I just need to make it work on my data. Is there any advantage or disadvantage of calculating the Qty and unit price on the form vs calculating it on table?
northwind database use the following on the form page =[txtQuantity]*[txtUnitPrice] for total of 1 row
I create a calculated field on my table that call total that doing the same thing.
my question is what is the best way to do?
Edit: Just looked and I do not think 2019 will do table calculations?
 
Last edited:
Thanks, I think the answer, then, is the same. The proper place for calculated values is in Forms and Reports. With only rare exceptions, storing calculated values in tables is bad juju.
 

Users who are viewing this thread

Back
Top Bottom