========================Append above
Option Compare Database
Option Explicit
Global TotCount As Integer
Function PrintLines(R As Report, TotGrp)
TotCount = TotCount + 1
If TotCount <= (10 - TotGrp) Then
R.NextRecord = False
' R![LabWFIndex].Caption = 11 - TotCount
'R![WIPCode].Visible = False
ElseIf TotCount > (10 - TotGrp) And TotCount < 11 Then
R.NextRecord = True
'R![LabWFIndex].Caption = 11 - TotCount
'R![WIPCode].Visible = True
End If
End Function
Function SetCount(R As Report)
TotCount = 0
'R![WFIndex].Visible = False
End Function
===============Append below
Private Sub 詳細資料_Print(Cancel As Integer, PrintCount As Integer)
TotCount = TotCount + 1
Dim i As Integer
If TotCount < Me.TotGrp Then
Me.NextRecord = True
For i = 0 To 14
Me.Controls("Text" & i).Visible = True
Next i
End If
If TotCount = Me.TotGrp Then
Me.Report.NextRecord = False
Else
If (TotCount > Me.TotGrp) And (TotCount < 14) Then
Me.Report.NextRecord = False
For i = 0 To 14
Me.Controls("Text" & i).Visible = False
Next i
End If
End If
' If TotCount <= (13 - Me.TotGrp) Then
' Me.NextRecord = True
' ' R![LabWFIndex].Caption = 11 - TotCount
' 'R![WIPCode].Visible = False
' ElseIf TotCount > (13 - Me.TotGrp) Then
' Me.NextRecord = False
' 'R![LabWFIndex].Caption = 11 - TotCount
' 'R![WIPCode].Visible = True
' End If
End Sub