I tried the following (some are commented out), but now I get no visibility at all, not conditional visibility.
Code:
Private Sub Report_Load()
'If TxnTypes = 3 Then
'Reports!rptPartsSold.CustName.Visible = True
'Reports!rptPartsSold.Quantity.Visible = True
'Else
'Reports!rptPartsSold.CustName.Visible = False
'Reports!rptPartsSold.Quantity.Visible = False
Me.CustName.Visible = Me!TxnTypes = "3"
Me.Quantity.Visible = Me!TxnTypes = "3"
'Me.CustName.Visible = Me!TxnTypes = "Wholesale"
'Me.Quantity.Visible = Me!TxnTypes = "Wholesale"
End Sub
TxnTypes is from a separate table that is part of the query used to generate the report. I tried 3 with and without the quotes; it is the ID for the type called "Wholesale".