G
GZ
Hi! On a report, I wrote code as following:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.txtPaid = Forms!Invoice.txtPaid
If IsNumeric(Me.txtPaid) Then
If CCur(Me.txtPaid) > 0 Then Me.lblTitle = "Receipt"
Else
Me.lblTitle = "Invoice"
End If
End Sub
On a forms, I have a button, when clicked, it will open the report, and
according to data on the form, to change text of a label on the header of
the form, but this label title never change right away. I have to click
"Design" the report then reopen the report then the effect can be seen.
How to fix this problem and let user click the open report and directly see
what the report should be?
Thanks!
GZ
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.txtPaid = Forms!Invoice.txtPaid
If IsNumeric(Me.txtPaid) Then
If CCur(Me.txtPaid) > 0 Then Me.lblTitle = "Receipt"
Else
Me.lblTitle = "Invoice"
End If
End Sub
On a forms, I have a button, when clicked, it will open the report, and
according to data on the form, to change text of a label on the header of
the form, but this label title never change right away. I have to click
"Design" the report then reopen the report then the effect can be seen.
How to fix this problem and let user click the open report and directly see
what the report should be?
Thanks!
GZ