G
Guest
I have this code in my detail section of a report
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Diagnosis As String
If [Diagnosis 1] = -1 Then Diagnosis = [Diagnosis Code 1]
If [Diagnosis 2] = -1 Then Diagnosis = [Diagnosis Code 2]
If [Diagnosis 3] = -1 Then Diagnosis = [Diagnosis Code 3]
If [Diagnosis 4] = -1 Then Diagnosis = [Diagnosis Code 4]
Print Diagnosis
End Sub
I would like the Diagnosis variable to print in an unbound textbox.
I tried TextBoxname.text = Diagnosis
I got an object need focus error.
I tried Textboxname.text.setfocus
Textboxname.text = Diagnosis
I got a no record error.
How can I print this variable in a text box?
If I use the print function is there any way to control where it prints on
the form?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Diagnosis As String
If [Diagnosis 1] = -1 Then Diagnosis = [Diagnosis Code 1]
If [Diagnosis 2] = -1 Then Diagnosis = [Diagnosis Code 2]
If [Diagnosis 3] = -1 Then Diagnosis = [Diagnosis Code 3]
If [Diagnosis 4] = -1 Then Diagnosis = [Diagnosis Code 4]
Print Diagnosis
End Sub
I would like the Diagnosis variable to print in an unbound textbox.
I tried TextBoxname.text = Diagnosis
I got an object need focus error.
I tried Textboxname.text.setfocus
Textboxname.text = Diagnosis
I got a no record error.
How can I print this variable in a text box?
If I use the print function is there any way to control where it prints on
the form?