H
Howard
I have a report with many columns based on a large crosstab that returns
in its cells either single letters or the strings "Dist", Merit" or
"Pass".
The textboxes in the detail are called text1, text2 etc and I
dynamically position, hide and format them in the Onformat event.
As the columns are small I want to change "Dist" to "D", "Merit" to "M"
and "Pass" to "P" befor I print it.
I've tried putting the code below in the OnPrint event of the detail
section but it won't work. Without setfocus I get an error telling me to
setfocus. With it I get an error saying setfocus is not allowed here.
Any ideas?
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
For x = 1 To nColumns
If Me("text" & Format$(x)) = "Dist" Then
Me("text" & Format$(x)).SetFocus
Me("text" & Format$(x)).Text = "D"
End If
Next x
End Sub
Howard
in its cells either single letters or the strings "Dist", Merit" or
"Pass".
The textboxes in the detail are called text1, text2 etc and I
dynamically position, hide and format them in the Onformat event.
As the columns are small I want to change "Dist" to "D", "Merit" to "M"
and "Pass" to "P" befor I print it.
I've tried putting the code below in the OnPrint event of the detail
section but it won't work. Without setfocus I get an error telling me to
setfocus. With it I get an error saying setfocus is not allowed here.
Any ideas?
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
For x = 1 To nColumns
If Me("text" & Format$(x)) = "Dist" Then
Me("text" & Format$(x)).SetFocus
Me("text" & Format$(x)).Text = "D"
End If
Next x
End Sub
Howard