Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-02-2004, 07:34 PM   #1
myme
Registered User
 
Join Date: Feb 2003
Location: Roseville, CA
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
myme
What is the easiest wayto do a daily calculation for a field in a table!!

I am having a problem doing a daily calculation for a certain field within table. Here is my scenario: I have a table w/ the folling fields

intSNC curBalIn SumOfcurPayment PBal interest Total
36349 $1,000.00 $166.00 $834 $.34 $992.24

I want to be able to pull the current interest owed and multiply the PBal by .1, then divide by 365 and add the interest to the new interest and then put back the total interest back into the interest field and do this daily. What is the easiest way to do it. I been trying with queries and can't seem make it do what i want it to do. thanks

myme is offline   Reply With Quote
Old 05-02-2004, 11:20 PM   #2
Parker
Registered User
 
Parker's Avatar
 
Join Date: Jan 2004
Location: UK
Posts: 316
Thanks: 0
Thanked 0 Times in 0 Posts
Parker
Quote:
Originally Posted by myme
I am having a problem doing a daily calculation for a certain field within table. Here is my scenario: I have a table w/ the folling fields

intSNC curBalIn SumOfcurPayment PBal interest Total
36349 $1,000.00 $166.00 $834 $.34 $992.24

I want to be able to pull the current interest owed and multiply the PBal by .1, then divide by 365 and add the interest to the new interest and then put back the total interest back into the interest field and do this daily. What is the easiest way to do it. I been trying with queries and can't seem make it do what i want it to do. thanks
Put something like this as an expresion in your query.
Sum(CLng([PBal])*(0.1/100)/365)

Then add the result of this to your interest colum in the same query.

Next I would run another query on theis first query and within it take the new value generated by this query and add it too PBal to get the new total owed.

Use this second query to append your origonal table with the new values. next time you run this pair of qrys they will run on the updated values and so on and so forth.


You could then set this to run automatically at acertain time of day. BUT if you do this you need to include an audit trail so that the transactions can be back checked.
__________________
Today’s nutter maybe tomorrows genius so don't call me a nutter-----just in case
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Parker is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump




All times are GMT -8. The time now is 07:47 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World