vb6中怎样打印数据中的记录
本帖最后由 xtyuao 于 2011-12-01 19:38:49 编辑 sub command1_clickdim fld as adodb.field
with rst
if .recordcount>0 then
.movefirst
while not .eof
for each fld in .fields
if not isnull(fld) then
printer.print cstr(fld);
end if
next
printer.print
.movenext
wend
end if
end with
printer.enddoc
end sub
printer.currentx=50
printer.currenty=20
printer.print "学号"
printer.currentx=50
printer.currenty=30
printer.print rst!学号 &""
For i = 0 To 5
If i = 3 Then Printer.Print
Printer.Print rst.Fields(i).Name & ":" & rst.Fields(i); Spc(1);
Next
Printer.EndDoc
补充:VB , 数据库(包含打印,安装,报表)