Displaying Records - Sorts, Sums, Etc 
Author Message
 Displaying Records - Sorts, Sums, Etc

I'd like to figure a way to sort, sort, display upon.etc

record Fields 1,2,3,4,5,6,7,8,9,10

Alot of Records

fld1 will be 5-6 text values
fld2 will be 20-25 text values
flds3-10 are numbers to total under those

I have tried;

var3 = 0
var4 = 0
etc

rs.MoveFirst
do while not rs.eof

if var1 = rs("1")
'Skip printing "1"
else
Print var1
end if

if var2 = rs("2")
'Skip Printing "2"
load totals
var3 = var3 + rs("3")
var4 = var4 + rs("4")
etc

else
var3 = rs("3")
var4 = rs("4")

end if

if var2 = rs("2")
'Skip Printing
else
Print var2
Print var3
Print var4
etc
'Clear values
var3 = 0
var4 = 0
etc

end if

var1 = rs("1")
var2 = rs("2")

rs.MoveNext
Loop

I always seem to be off by 1 record, or the flds 1,2
are off by 1.

Any Suggestions

Thank you in advance

Matt



Wed, 29 Dec 2004 12:08:58 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Report showing BOTH Aggregate Sum of Display records and Total Sum by Group

2. VB5: Displaying sorted records...

3. Sorting records after report is displayed in web viewer

4. Rich Text Box / Word box etc that displays tables etc

5. Displaying Array - Stuck summing values

6. Sort on Running Sum

7. VB5 /Access2: Sorting Records after an ADD record event

8. Displaying Manual Running sum in Chart

9. HOW DO I GROUP AND SUM CERTAIN RECORDS IN A SUBFORM

10. Sum Records in a RecordSet

11. Summing values in records of a subform

12. Sum specific records

 

 
Powered by phpBB® Forum Software