Question (1 Viewer)

PNGBill

Win10 Office Pro 2016
Local time
Tomorrow, 06:28
Joined
Jul 15, 2008
Messages
2,271
ok so do I need to store the tax amount in the tblOrderDetails or would I just recalculate it for frmRecordPymt?
It should be stored as if the rate changes your history will also change which of course will be an error.
Store OrderDetailID, OrderHeaderID, SKU, Qty, Price and TaxAmount.
You could store TaxRate instead of TaxAmount. Either will do. Just so long as you record enough to recreate the sale in the future.
 

Nicolette

Always Learning
Local time
Today, 12:28
Joined
Jun 26, 2010
Messages
178
How do I store a calculated field I know it generally is a no no...
 

PNGBill

Win10 Office Pro 2016
Local time
Tomorrow, 06:28
Joined
Jul 15, 2008
Messages
2,271
You are not really storing a Calculated Field in the sence you fear.
You are storing the Sales Tax Amount.
You could store the sales tax percentage, mentioned earlier - (not calculated.)
The net effect is you must store either the Tax Amount or the Tax Percentage - toss a coin and decide.

You store the value the same as you store the qty, SKU, etc.
If you find it easier to store the tax percentage then do this.

I will try and redo the input form for creating a new Order and post this but it will take a day or two.

There is another method to handle the creation of a new order and when I post it you can evaluate and if you wish replicate same in your database.
This method avoids some of the issues surrounding getting values from different tables etc and trying to get all this into a table (tblOrderHeader and tblOrderDetail)
Give me a day or two as am in the process of some changes to our own database.
 

Nicolette

Always Learning
Local time
Today, 12:28
Joined
Jun 26, 2010
Messages
178
Ok because nothing is being passed to tblOrderDetails.... I'll keep working at it... Oh that would be great... I'll keep plugging away on what I have... take your time you have already be most helpful, and I thank you!
 

Users who are viewing this thread

Top Bottom