Re: Date
From: Armen Stein (Armen_RemoveThis__at_RemoveThis_JStreetTech.com)
Date: 03/26/04
- Next message: Armen Stein: "Re: Reporting on tables and fields"
- Previous message: Armen Stein: "Re: Syncronizing 2 databases"
- In reply to: arranpatel: "Date"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 26 Mar 2004 00:07:47 -0800
In article <arranpatel.13lzm9@nospam.MSAccessForum.com>,
arranpatel.13lzm9@nospam.MSAccessForum.com says...
>
> I have a table called Invoice
>
> In the table there are 8 fields
>
> Invoice Id
> ID
> Amount due
> Monthly payments
> total due
> Start_Date
> End_date
> Current_date
>
>
> What i need to do is have the total due constant at £120
> then the Monthly payment at £10
> and each month for the Amount due to go down by £10
>
> In the start date i had an expression Date() but then i realised that
> it is the current date and does not stay the same ( i need it to stay
> the same date as when a new record is added to the date) and the End
> date i had as Date() + 365, So that it would increase the start date by
> 1 year for an end date, but that only chnages the current date.
>
> how do i get those dates to stay the same?
> and make it so that the Amount due goes down by £10 each month?
>
> Thanks for any help
> Arran
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~View and post usenet messages directly from http://www.ExcelForum.com/
>
>
Hi Arran,
It sounds like you need to use Date() in the default property - this
will add it for new records, but not change it after that.
Also, to get a year later, you should probably use DateAdd to add 1
year, instead of adding 365 days - remember leap years.
As far as a declining amount - it's not a good idea to change the value
in the field over time, because you lose the history of what's happened.
Instead, store an original amount in the main record, then store
transactions in a related child table. You can get a current balance
any time by subtracting the sum of the transactions from the original
balance.
Alternatively, you can store the original balance as one of the
transactions.
Hope this helps,
-- Armen Stein Access 2003 VBA Programmer's Reference http://www.amazon.com/exec/obidos/ASIN/0764559036/jstreettech-20 J Street Technology, Inc. Armen _@_ JStreetTech _._ com
- Next message: Armen Stein: "Re: Reporting on tables and fields"
- Previous message: Armen Stein: "Re: Syncronizing 2 databases"
- In reply to: arranpatel: "Date"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|