Report issues with Yes/No in a string

TrishaL

Board Regular
Joined
Jul 9, 2013
Messages
56
Office Version
  1. 2019
Platform
  1. Windows
Hi
In my report I have this:
=("Availability Water Sourcing: " & [AvailabilityWaterSourcing])
This field is a yes/no field. I think I have all of my settings right for yes/no field, etc. When it is in the string it shows as "0" or "-1". When I take it out of the string it works properly and shows yes or no in my report. I want it in the string as it makes it look nicer when I print as I have a number of fields.

If anyone could help me with this I would appreciate it. Thank you
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
AFAIK, all you need to do is format the control (in design view) as yes/no.
When it is in the string it shows as "0" or "-1". When I take it out of the string it works properly and shows yes or no in my report.
I don't understand that. A string can only be text. Maybe you mean 'when it(?) is in the expression'. I take it that the control with that expression is not bound to anything.
 
Upvote 0
AFAIK, all you need to do is format the control (in design view) as yes/no.

I don't understand that. A string can only be text. Maybe you mean 'when it(?) is in the expression'. I take it that the control with that expression is not bound to anything.
Hi, I have this entered in a text box: =("Availability Water Sourcing: " & [AvailabilityWaterSourcing])
The field "AvailabilityWaterSourcing" is a yes/no text field in my query. When I put it into the string shown above it shows as -1 and 0. Is there a way to show as a Yes/No?
 
Upvote 0
Try replacing [AvailabilityWaterSourcing] with this formula.
Excel Formula:
 Iif([AvailabilityWaterSourcing], "Yes", "No")
 
Upvote 0
Solution
Try replacing [AvailabilityWaterSourcing] with this formula.
Excel Formula:
Iif([AvailabilityWaterSourcing], "Yes", "No")
Yes of course. This works perfectly. Thank you so very much!!
 
Upvote 0
Well, you didn't say whether or not you formatted the control to yes/no so I guess we'll never know if that would have worked for you.
With that solution, if there is no value in the field it is neither true or false, it is null, so then what?
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,938
Members
448,534
Latest member
benefuexx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top