A real begineer
Registered User.
- Local time
- Today, 18:36
- Joined
- Nov 4, 2000
- Messages
- 74
I give up… I am totally baffled by this.
I have a report, which produces messages, depending on the values of the report. For example if txtCyn = 1 and should equal 2 it says strZ=”Please add another one”.
I use a sub called Print1 (strZ) to process the messages. Essentially it says if Me.txtR1 is empty then goto Print1a (strZ).
Private Sub Print1 (strZ)
If Me.txtR1 = "" Or IsNull(Me.txtR1) Then
Me.txtR1 = strZ
If Me.txtR1 <> "" Or IsNull(Me.txtR1) = False Then
lblR1.Visible = True
End If
If blnA = True Then
Call Print2
Exit Sub
End If
Else
Call print1a(strZ)
End If
End Sub
This method works fine all the way through all three reports currently using this method. Unless I have more than 10 messages. For some reason when Me.txtR11 is called the number lblR11 prints but the message does not.
To add even more bafflement I can track the message right through Print2 to the command:
Docmd.OpenReport,”myReport”,acViewPreview
It is only on Screen or Print the message does not appear for some reason.
So far I have tried stepping through the code, and I cannot see where the value is changing. I have tried assigning me.txtR11 to a msgbox and added that to every step before and after it is called the value is carried through each step without a problem.
I am wondering is there some bug I am not aware of making R11 an inoperable txtName. Perhaps I need to change them to Ra, Rb, Rc etc.
I have a report, which produces messages, depending on the values of the report. For example if txtCyn = 1 and should equal 2 it says strZ=”Please add another one”.
I use a sub called Print1 (strZ) to process the messages. Essentially it says if Me.txtR1 is empty then goto Print1a (strZ).
Private Sub Print1 (strZ)
If Me.txtR1 = "" Or IsNull(Me.txtR1) Then
Me.txtR1 = strZ
If Me.txtR1 <> "" Or IsNull(Me.txtR1) = False Then
lblR1.Visible = True
End If
If blnA = True Then
Call Print2
Exit Sub
End If
Else
Call print1a(strZ)
End If
End Sub
This method works fine all the way through all three reports currently using this method. Unless I have more than 10 messages. For some reason when Me.txtR11 is called the number lblR11 prints but the message does not.
To add even more bafflement I can track the message right through Print2 to the command:
Docmd.OpenReport,”myReport”,acViewPreview
It is only on Screen or Print the message does not appear for some reason.
So far I have tried stepping through the code, and I cannot see where the value is changing. I have tried assigning me.txtR11 to a msgbox and added that to every step before and after it is called the value is carried through each step without a problem.
I am wondering is there some bug I am not aware of making R11 an inoperable txtName. Perhaps I need to change them to Ra, Rb, Rc etc.