Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2008 > Visual Basic 2008 Essentials
|
Visual Basic 2008 Essentials If you are new to Visual Basic programming with version 2008, this is the place to start your questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2008 Essentials section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2011, 08:48 PM
Authorized User
 
Join Date: Jun 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Post Need a quick script to do some simple math

Hello,

I'd love to be able to write something like this for myself, but my VB skills are not that good :-(

I need a string code that will multiply two fields, divide by 360 and make that equal to a Per Diem field

((Principal Balance * Interest Rate)/360) = Per Diem


Any help on this would be greatly appreciated

Thank you,
David92595
 
Old July 7th, 2011, 09:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Sorry, you need what?
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old July 8th, 2011, 12:20 PM
Authorized User
 
Join Date: Jun 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default further info, hope it helps

I need a piece of code that will multiply two fields and then divide them by 360.

so for example I need a piece of code that will pull infomation from
([Forms]![Document Info]![Principal Balance] * [Forms]![Document Info]![Interest Rate])/360 and have that number show in [Forms]![Document Info]![Per Diem rate]


the fields Principal balance and interest rate will be pre entered manually. I just need something that will do the math. The hard part is that I need this to only apply to new records. I have no idea how to go about writing something like that.

Please let me know if you need further information.
Your help is greatly appreciated!

David92595

Last edited by David92595; July 8th, 2011 at 03:45 PM..
 
Old July 11th, 2011, 01:59 PM
Authorized User
 
Join Date: Jun 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy

Here is the codes I'm using in a query that is set to run after update. So after interest rate is entered, the query runs automatically. It's doing what it is supposed to do and returning the correct value. My problem is that the query returns the correct amount, but do so hundreds to thousands of times in the same column in the query. I only need it to show once.

Code:Per Diem: ([Forms]![NewOrdersCa]![PB]*[Forms]![NewOrdersCa]![Interest_Rate])/360

Any help would be greatly apprecheated, as I have today only to finish this glitch.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with simple mail script KobusMans Beginning PHP 1 December 10th, 2009 04:02 AM
Simple - Quick Answer hopefully! IainAL VB How-To 4 April 18th, 2007 07:53 AM
Simple Logout Script webXtreme ASP.NET 1.0 and 1.1 Basics 0 November 7th, 2006 01:18 PM
Math Namespace transtar C# 3 February 12th, 2006 09:50 AM
multiple word query on simple phpMysql script peter_G PHP Databases 9 December 2nd, 2004 10:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.