Re: Date

From: Armen Stein (Armen_RemoveThis__at_RemoveThis_JStreetTech.com)
Date: 03/26/04


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


Relevant Pages

  • Re: SUM on 1 uniques record from primary table
    ... in this way I see the correct amountpaid for each invoice but the Grand total in the report footer should display the total of all amountspaid for all invoices. ... now it displays only the last amount paid. ...
    (microsoft.public.access.reports)
  • Re: How to "POST" accounting data into underlying tables
    ... charges to be added to an invoice. ... One option would be to put a SetValue macro on the After Update event of ... This assumes that Invoice Number is the name of the combobox, and Amount ...
    (microsoft.public.access.macros)
  • Re: Get Sum Amount from SubForm
    ... Instead of referring to TotInvoiceAmt in your code, ... I have a Mainform (Invoice) with a Subform with details. ... control name 'Amount ' and in the Form footer I have a control TotAmt ... many times I can press the PayButton before going to the ...
    (microsoft.public.access.forms)
  • Wrong amount on claim - CPR ?
    ... Need a small amount of "small claims court" procedure info. ... disputed some of an invoice). ... invoice in dispute the solictors who filed the claim used the wrong ...
    (uk.legal)
  • Re: Multiple Fields in record
    ... store the total invoice amount anywhere. ... detail amounts others will be blank and only a totals amount would be in ... You might like to look at a couple of my favourite web references on ...
    (microsoft.public.access.gettingstarted)