Home Forum Contact

 Access World Forums What is the easiest wayto do a daily calculation for a field in a table!!
 Register FAQ Members List Social Groups Top Posters Search Today's Posts

 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 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
05-02-2004, 11:20 PM   #2
Parker
Registered User

Join Date: Jan 2004
Location: UK
Posts: 316
Thanks: 0
Thanked 0 Times in 0 Posts
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.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Access World     Access World News     Site Suggestions     Introduce Yourself     The Watercooler Microsoft Access Discussion     General     Tables     Queries     Forms     Reports     Macros     Modules & VBA     Theory and practice of database design     Access Web Microsoft Access Reference     Access FAQs     Code Repository     Sample Databases     Microsoft Access Tutorials     Microsoft Access User Groups Apps and Windows     SQL Server     Crystal Reports     Visual Basic     VB.NET     Word     Excel     Web Design and Development         ASP and ASP.NET         PHP & MySQL     Windows     Other Software     Hardware Questions and Answers Non-Access Issues     Politics & Current Events     Debates     Gaming     Sports, Health & Fitness     Gadgets     Small Business

All times are GMT -8. The time now is 08:24 PM.

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