In my report, there is a textbox that displays the Buyer's name for a purchase order. The Buyer's name is determined by the first two digits of the purchase order number.
I have that code in the On_Current event and it works if I click the individual record in Report View. However, the buyer's name is reflected in all the records. In Print Preview, it shows blank.
I need to print the reports and have it display the correct Buyer's name for each record. How can I do this?
PS: If I put the code in the On_Load event, it shows only one Buyer's name for all records.
Code:
Dim Buyer As String
Buyer = Left(Me.PurchaseOrder, 2)
If Buyer = 23 Then
Me.txtBuyer = "Buyer1 Name"
End If
If Buyer = 33 Then
Me.txtBuyer = "Buyer2 Name"
End If
If Buyer = 30 Then
Me.txtBuyer = "Buyer3 Name"
End If
I have that code in the On_Current event and it works if I click the individual record in Report View. However, the buyer's name is reflected in all the records. In Print Preview, it shows blank.
I need to print the reports and have it display the correct Buyer's name for each record. How can I do this?
PS: If I put the code in the On_Load event, it shows only one Buyer's name for all records.