View Single Post
  #2  
Old December 5th, 2009, 12:48 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Change default value without influencing old records

On Fri, 4 Dec 2009 09:09:01 -0800, jaworski_m
wrote:

There are the following tables:

tblSuppliers
supplierName (PK)
invoicePaymentTime
(other fields)

tblGoods
goodsID (PK)
goodsName
supplierName (FK)

Each time I choose a "Supplier Name" I want "Invoice Payment Time" to be
filled with a corresponding value (30,60 days etc.).
My form uses a combo box for supplier name which asigns these values.

QUESTION:
In case "Invoice Payment Time" for a supplier changes (30 - 45 days) I want
a new value to be used for new records and don't modify existing ones.

The above described design doesn't allow this. How should it be improved?

Thank you for suggestions.

winXP
access 2003


Your table design makes this impossible. You'll need to store either the
invoice payment time or the due date in your invoice table, since its value
cannot be calculated, since you need not only the current InvoicePaymentTime
but its value at a point in time in the past.
--

John W. Vinson [MVP]