Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2008 > Visual Basic 2008 Essentials
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 7th, 2011, 08:48 PM
Authorized User
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old July 7th, 2011, 09:55 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,190
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.
================================================== =========
Reply With Quote
  #3 (permalink)  
Old July 8th, 2011, 12:20 PM
Authorized User
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #4 (permalink)  
Old July 11th, 2011, 01:59 PM
Authorized User
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with simple mail script KobusMans Beginning PHP 1 December 10th, 2009 03: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 12:18 PM
Math Namespace transtar C# 3 February 12th, 2006 08:50 AM
multiple word query on simple phpMysql script peter_G PHP Databases 9 December 2nd, 2004 09:21 AM



All times are GMT -4. The time now is 06:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.