# 一个想透了脑的程式 !!!

Posted by kkcheung on May 29, 1999 at 13:26:38:

Do While Not tempset.EOF
temp1 = tempset.Fields!send_name :temp2 = tempset.Fields!CUS_name
temp3 = tempset.Fields!class_name:temp4 = tempset.Fields!Weight
Printer.Print Tab(2); temp1; Tab(10); temp2; Tab(40); temp3; Tab(55); temp4
tempset.MoveNext

If Not tempset.EOF Then
If temp1 <> tempset.Fields!send_name Then
Printer.NewPage
temp1 = tempset.Fields!send_name
End If
End If

上面一段程式是如果temp1不相同上一个temp1,便newpage.
出来的结果是:
aaaa,bbbb,cccc,1000
aaaa,bbbb,cccc,500
aaaa,bbbb,dddd,200
aaaa,zzzz,cccc,200
aaaa,zzzz,cccc,400
怎样可以张结果改成
aaaa,bbbb,cccc,1500
aaaa,bbbb,dddd,200
aaaa,zzzz,cccc,600
希望大家明白我意思.谢谢!

Follow Ups:

- Re: 一个想透了脑的程式 !!! Scott 16:29:33 5/29/99 (3)
  - 再请教,我有此不明白? kkcheung 22:05:46 5/29/99 (2)
    - Re: 再请教,我有此不明白? Scott 01:45:46 5/30/99 (0)
    - Re: 再请教,我有此不明白? Scott 01:42:13 5/30/99 (0)