Populate field

mtagliaferri

Registered User.
Local time
Today, 12:25
Joined
Jul 16, 2006
Messages
550
Hi I have the following problem:
I have the table "tblCost" which has a price list with different cost of the hourly rate according to the date, I then have a table "tblDuty" that needs to be populated according the entry, example: the users opens the frmDuty and enter the date 01/01/2008 and 2 hours of duty, the field price on the frmDuty should populate with the value form the tblCost, because the date is 01/04/2008 it should pick the price "2,00" from the tblPrice because the date is from 01/04/2008 and 17/06/2008, once is selected a date 18/06/2008 or higher it should pick up the price of 2,10.
This value should be writen in the tbleDuty after the update as I have a qry that runs on that table.
I hope I gave full informations
 

Attachments

If I've understood you correctly, it sounds as if you are wanting to store a calculated field. If this is correct there are a number of very good reasons why you shouldn't. Chief amongst those is the question, why waste space storing a value that is calculated from data already stored within the DB, and can therefore be calculated at any time it is required, for display purposes? The topic is covered more fully in this article.
 

Users who are viewing this thread

Back
Top Bottom