RexJacobus
Programmer
I am having problems using a crosstab query in a report. The preview looks good but when the report prints the last record from one page is the top record on the next and the last overall record gets dropped. Here's my code.
If Not rstReport.EOF Then
If Me.FormatCount = 1 Then
For intX = 1 To intColumnCount
Select Case intX
Case 1
'xtabCNulls converts Nulls to 0.
sName = " " & xtabCnulls rstReport(intX - 1))
Case 2
Me("txtUser" = xtabCnulls(rstReport(intX - 1)) & sName
sName = sName
Case 3
Case Else
iData = xtabCnulls(rstReport(intX - 1))
If iData < 420 Then
Me("txt" + Format(intX)) = iData
Me("txt" + Format(intX)).FontWeight = (800)
Else
Me("txt" + Format(intX)) = "Y"
Me("txt" + Format(intX)).FontWeight = (100)
End If
End Select
Next intX
' Hide unused text boxes
For intX = intColumnCount + 2 To conTotalColumns
Me("txt" + Format(intX)).Visible = False
Next intX
rstReport.MoveNext
End If
End If
If anyone could tell me what is wrong with my report I would appreciate it.
Thanks,
jim
If Not rstReport.EOF Then
If Me.FormatCount = 1 Then
For intX = 1 To intColumnCount
Select Case intX
Case 1
'xtabCNulls converts Nulls to 0.
sName = " " & xtabCnulls rstReport(intX - 1))
Case 2
Me("txtUser" = xtabCnulls(rstReport(intX - 1)) & sName
sName = sName
Case 3
Case Else
iData = xtabCnulls(rstReport(intX - 1))
If iData < 420 Then
Me("txt" + Format(intX)) = iData
Me("txt" + Format(intX)).FontWeight = (800)
Else
Me("txt" + Format(intX)) = "Y"
Me("txt" + Format(intX)).FontWeight = (100)
End If
End Select
Next intX
' Hide unused text boxes
For intX = intColumnCount + 2 To conTotalColumns
Me("txt" + Format(intX)).Visible = False
Next intX
rstReport.MoveNext
End If
End If
If anyone could tell me what is wrong with my report I would appreciate it.
Thanks,
jim