Private Function PrintOnePage(Recset As Recordset) As Boolean
Dim HoldY As Integer ' 直前の印刷Y座標を保持
' レコード終端になったらFALSEを返して戻る
If Recset.EOF = True Then
PrintOnePage = False
Exit Function
End If
Printer.CurrentY = Printer.CurrentY + LINE_FEED_MARGINES
HoldY = Printer.CurrentY
Printer.CurrentX = START_X
PrintField Recset.Fields("MovieID")
Printer.CurrentX = TITLE_X
Printer.CurrentY = HoldY
PrintField Recset.Fields("タイトル")
Printer.CurrentX = COUNTRY_X
Printer.CurrentY = HoldY
PrintField Recset.Fields("国")
Recset.MoveNext
' 区切り線
Printer.CurrentX = START_X
Printer.CurrentY = Printer.CurrentY + LINE_FEED_MARGINES
Printer.Line -(START_X + 160, Printer.CurrentY + 0.5), QBColor(8), BF
Printer.CurrentY = Printer.CurrentY + LINE_FEED_MARGINES
' 完了したらTrueを返す
PrintOnePage = True
End Function
|