PC Review


Reply
Thread Tools Rate Thread

Change default value without influencing old records

 
 
jaworski_m
Guest
Posts: n/a
 
      4th Dec 2009
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
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      5th Dec 2009
On Fri, 4 Dec 2009 09:09:01 -0800, jaworski_m
<(E-Mail Removed)> 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]
 
Reply With Quote
 
jaworski_m
Guest
Posts: n/a
 
      5th Dec 2009
Thank you for reply.

If "Invoice payment time" should be in invoice table, how can I provide a
default value (stored in some location) for this field depending on which
supplier is chosen i.e.:

- supplier A - payment 30days
- supplier B - payment 60days
- etc.?



"John W. Vinson" wrote:

> On Fri, 4 Dec 2009 09:09:01 -0800, jaworski_m
> <(E-Mail Removed)> 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]
> .
>

 
Reply With Quote
 
Jeanette Cunningham
Guest
Posts: n/a
 
      5th Dec 2009
Add a new field to the Suppliers table.
Make it a text field to show the current payment terms for each supplier.

Add the payment terms field/column to the query for the combo and add an
extra column to the combo.
You can make that column in the combo a hidden one if you like.
After chooses a supplier from the combo, your code sets the invoice payment
time field using that value from the extra column in the combo.



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"jaworski_m" <(E-Mail Removed)> wrote in message
news:CA3E8BB1-1F1C-42E2-ADE7-(E-Mail Removed)...
> Thank you for reply.
>
> If "Invoice payment time" should be in invoice table, how can I provide a
> default value (stored in some location) for this field depending on which
> supplier is chosen i.e.:
>
> - supplier A - payment 30days
> - supplier B - payment 60days
> - etc.?
>
>
>
> "John W. Vinson" wrote:
>
>> On Fri, 4 Dec 2009 09:09:01 -0800, jaworski_m
>> <(E-Mail Removed)> 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]
>> .
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Influencing RandBetween Art W Microsoft Excel Misc 3 9th Aug 2009 08:38 AM
Influencing Random Numbers Art W Microsoft Excel Misc 1 7th Aug 2009 06:52 AM
Influencing drive-letter mappings eturfboer Windows XP Setup 2 9th Jan 2008 07:52 PM
Lock single records on form set to Continuous Records Default View =?Utf-8?B?UGF0IERvb2xz?= Microsoft Access Form Coding 1 12th Oct 2007 07:58 PM
Chart Influencing Data =?Utf-8?B?RGF2ZQ==?= Microsoft Excel Misc 1 17th Aug 2007 05:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:15 PM.