Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gTotal code for Running total in query returning boxes

Status
Not open for further replies.

RBE

Programmer
May 25, 2000
72
US
I am trying to create a running total in a query. Here is what I have done. The results I am comming back with is two little "boxes" at least that is what they look like. I am using ms access 2000


In a modual I have

Option Compare Database
Option Explicit
Global gTotal As Long

Public Function Running_Total(intCost As Long)
gTotal = gTotal + intCost
Running_Total = gTotal
End Function

In a query I have

Total: Running_Total([gallons received])

do you see anything wrong here. I really need this to work or some other way to create a running total in a query. Thanks
You can always say tomarrow, but when you say yesterday, today is easier.

RBE

Our prayers go out to the WTC victims
 
ok I have it comming back with a result and it is giving me a running total but it is starting with some out ragiously high number. Could be the total for all the gallons in the database. how do I get it to start from 0? You can always say tomarrow, but when you say yesterday, today is easier.

RBE

Our prayers go out to the WTC victims
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top