Change number to text in report (1 Viewer)

sour

Registered User.
Local time
Today, 04:00
Joined
Oct 26, 2018
Messages
21
I have a report that has week numbers within each week are cranes that have a delivery date, I have identified that all cranes go into storage has a week "0"
Within the report I want to replace the "0" with some text "STORE", I have tried VBA using an if statement, conditioning format just cant get it to work, the "0" is a number field, any ideas.
 

June7

AWF VIP
Local time
Today, 03:00
Joined
Mar 9, 2014
Messages
5,463
Can have expression in query or textbox ControlSource.

=IIf([fieldname]=0, "STORE", [fieldname])
 

sour

Registered User.
Local time
Today, 04:00
Joined
Oct 26, 2018
Messages
21
Ok I have just tried it but get a syntax error, I have tried it by adding the result to a text box as below

Private Sub Report_Open(Cancel As Integer)
=IIf([WK]=0, "STORE", [TEXT168])
End If
End Sub
 

sour

Registered User.
Local time
Today, 04:00
Joined
Oct 26, 2018
Messages
21
Sorry forgot to put thanks for your help
 

sour

Registered User.
Local time
Today, 04:00
Joined
Oct 26, 2018
Messages
21
O just tried it in the query worked first time thank you very much.
 

June7

AWF VIP
Local time
Today, 03:00
Joined
Mar 9, 2014
Messages
5,463
The VBA you attempted is invalid structure, totally nonsense. VBA would not be best approach anyway.

Glad you got it resolved.
 

Users who are viewing this thread

Top Bottom