N
Nathan Sanders
Hi,
Given the following code, why am I getting an overflow error on the
highlighted line?
Please help.
Private Sub Command21_Click()
Dim txtdata As Recordset
Dim dbs As Database
Dim strsql As String
Dim trnval As Integer
Dim trncount As Integer
Dim hashtot As Integer
Set dbs = CurrentDb
strsql = _
"SELECT * from credfile"
Set txtdata = dbs.OpenRecordset(strsql)
Open "parktest.pc2" For Output As #1
Write #1, _
1, _
1, _
530, _
361575, _
0, _
2, _
2, _
, _
"park auto services"
Do Until txtdata.EOF
Write #1, _
2, _
txtdata!bank, _
txtdata!brch, _
txtdata!bacct, _
txtdata!suffix, _
52, _
txtdata!pay, _
txtdata!name, _
txtdata!glcode, _
txtdata!glcode, _
txtdata!glcode, _
txtdata!glcode, _
"caltex trentham", _
txtdata!acct, _
txtdata!acct, _
txtdata!acct
txtdata.MoveNext
Loop
trnval = DSum("pay", "credfile") 'THESE THREE LINES CAUSE
ERROR 6 OVERFLOW
trncount = DCount("pay", "credfile") '
hashtot = DSum("bacct", "credfile") '
Write #1, _
3, _
trnval, _
trncount, _
hashtot
Close #1
End Sub
Given the following code, why am I getting an overflow error on the
highlighted line?
Please help.
Private Sub Command21_Click()
Dim txtdata As Recordset
Dim dbs As Database
Dim strsql As String
Dim trnval As Integer
Dim trncount As Integer
Dim hashtot As Integer
Set dbs = CurrentDb
strsql = _
"SELECT * from credfile"
Set txtdata = dbs.OpenRecordset(strsql)
Open "parktest.pc2" For Output As #1
Write #1, _
1, _
1, _
530, _
361575, _
0, _
2, _
2, _
, _
"park auto services"
Do Until txtdata.EOF
Write #1, _
2, _
txtdata!bank, _
txtdata!brch, _
txtdata!bacct, _
txtdata!suffix, _
52, _
txtdata!pay, _
txtdata!name, _
txtdata!glcode, _
txtdata!glcode, _
txtdata!glcode, _
txtdata!glcode, _
"caltex trentham", _
txtdata!acct, _
txtdata!acct, _
txtdata!acct
txtdata.MoveNext
Loop
trnval = DSum("pay", "credfile") 'THESE THREE LINES CAUSE
ERROR 6 OVERFLOW
trncount = DCount("pay", "credfile") '
hashtot = DSum("bacct", "credfile") '
Write #1, _
3, _
trnval, _
trncount, _
hashtot
Close #1
End Sub