TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Steve Gerrard
date: 2005-01-08 15:20:00
subject: Re: Select sum income - e

"John L {at}yahoo.com>"  wrote in message
news:1zWDd.12341$wi2.1383{at}newssvr11.news.prodigy.com...
| Hi all - thanks for any help --
|
| Very new to programming and trying now to write a simple database
program
| with VB 6 which will show the total of orders vs expenses in a
database
| (ordersinfo).
|
| I would like to click a button on my form and have a total appear in a
text
| box (textbalance).  "Select sum(income) from ordersinfo -   (expenses) ordersinfo" obviously doesn't work but
I
| don't know how to change it.  Been trying to figure it out for about 3
| days.... :(((

Select Sum(Income)-Sum(Expenses) As Balance From OrdersInfo

Or, since subtraction is commutative (is that the word?):

Select Sum(Income-Expenses) As Balance From OrdersInfo

| Also there used to be a VB archive where you could go to look up
previous
| questions from the VB newsgroup - but I can't find it now - is it
still
| around?  Where?

Google.
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 1/8/05 3:20:11 PM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270 5030/786
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.