deagon
Posts: 31
|
| Posted: 02/15/2007, 7:36 AM |
|
Currently I have CCDLookup using the following Code sorting two table Columns and it works really well.
Dim Conn
Dim tmp
Set Conn = new clsDBjobstatus
conn.open
EventCaller.Value = CCDLookup("Sum(orderValue)","Jobs","SalesRealease between '2007-01-01 00:00:00' and '2007-01-31 00:00:00' ",Conn)
If EventCaller.Value = "" then
EventCaller.Value = "None"
This works great for the Sales value per month but now my next table needs this information and to subtract another sort from it. Currenty I SUM the ordervalue and SalesRelease per month and display it in a label, nice. But now I need to take another sort of actual ship value
like Ordervalue with actualshiptocustomer column and subtract from the existing SUM of ordervalue with salesrelease. Is there a way to do this thats simple so that it displays the data quickly instead of hidden calculation and then display?
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 02/16/2007, 10:47 AM |
|
Letr SQL do the work!
YOu can do sum(Ordervalue-Othervalue)
"deagon" <deagon@forum.codecharge> wrote in message
news:645d47e177d9a0@news.codecharge.com...
> Currently I have CCDLookup using the following Code sorting two table
> Columns
> and it works really well.
>
> Dim Conn
> Dim tmp
> Set Conn = new clsDBjobstatus
> conn.open
> EventCaller.Value = CCDLookup("Sum(orderValue)","Jobs","SalesRealease
> between
> '2007-01-01 00:00:00' and '2007-01-31 00:00:00' ",Conn)
>
> If EventCaller.Value = "" then
> EventCaller.Value = "None"
>
> This works great for the Sales value per month but now my next table needs
> this
> information and to subtract another sort from it. Currenty I SUM the
> ordervalue
> and SalesRelease per month and display it in a label, nice. But now I need
> to
> take another sort of actual ship value
> like Ordervalue with actualshiptocustomer column and subtract from the
> existing
> SUM of ordervalue with salesrelease. Is there a way to do this thats
> simple so
> that it displays the data quickly instead of hidden calculation and then
> display?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|