SunQuest
           MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 12th, 2004, 08:12 PM
BratCat2 BratCat2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 20 BratCat2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Easy Subtraction in fields ?

I have three fields that are named
Deposit Balance Refund


I would like to have the Deposit and Balance fields show the same value when it's entered into the recordset and if a value for Refund is entered, have that amount subtracted from the Balance leaving the Deposit the same.

SQLstring = "Select Deposit, Refund WHERE Refund - Balance"

???

I'd rather do it automatically on the Text_Change Sub when data is entered in the field.

THX in advance.

Reply With Quote
  #2  
Old March 14th, 2004, 03:02 AM
BratCat2 BratCat2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 20 BratCat2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Figured most of it out

Text11.Text = Val(Text9.Text) - Val(Text10.Text)

This works but only first two digits, if I use currency format it doesn't.

Anyone know how I can use cents (10.XX) with using number formating in the textbox. If I type in 10.50 the result changes to using only two digits.

THX

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Easy Subtraction in fields ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway