Hello,

I have a report that needs to show a running total of a certain set of numbers. Below is an example of what I need to see on the report (the columns should be side by side but I don't know how to post it that way):

Field Length
16
16
50
50
30

Start
1
17
33
83
133

I need an expression/formula that I can put in a text box for the Start column on a report or some code I can add to the code that creates my TableInfo table. As you can see I have to start with 1 and then add the next field length plus the number 1 and then add the next field length to that and so on. Below is the code for the TableInfo table:

Option Compare Database
Private Sub cmdReadTDef_Click()
Dim db As DAO.Database
Dim RS As DAO.Recordset
Dim fld As DAO.Field
Dim TDef As DAO.TableDef

Set db = CurrentDb
Set RS = CurrentDb.OpenRecordset("TableInfo")
Set TDef = db!MainFinal
With RS
For Each fld In TDef.Fields
.AddNew
.Fields("FieldName") = fld.Name
.Fields("fieldSize") = fld.Size
Select Case fld.Type
Case dbText
.Fields("FieldType") = "Text"
Case dbInteger
.Fields("FieldType") = "Integer"
Case dbLong
.Fields("FieldType") = "Long"
Case dbSingle
.Fields("FieldType") = "Single"
Case dbDouble
.Fields("FieldType") = "Double"
Case dbCurrency
.Fields("FieldType") = "Currency"
Case dbBoolean
.Fields("FieldType") = "Boolean"
Case dbDate
.Fields("FieldType") = "Date/Time"
Case dbMemo
.Fields("FieldType") = "Memo"
End Select
.Update
Next fld
End With
Set TDef = Nothing
Set RS = Nothing
Set db = Nothing
End Sub

I would appreciate any help anyone can give.