convert -1 and 0 to True and false in the query

L

Lim Heng Sin

in the query, i put this line of code in pone of the field:
Attrition: IIf([BadgeNoForecast];Yes;No)

But the result displayed when i run the query is -1 or 0.
But i don't want this one. I want it's either
displayed "True" or "False". Please don't ask me to do in
this way:
Attrition: IIf([BadgeNoForecast];"Yes";"No") because i
have other field in the query, Result. The code for the
result will be in this way:
Result: BadgeNoForecast And BadgeNoActual

If i put the line:
Attrition: IIf([BadgeNoForecast];"Yes";"No")
it will give me trouble because "Yes" or "No" will become
string, not the Boolean anymore. I will having difficulty.
 
W

Wayne Morgan

You can simply leave it as it is. In the form or report where you want to display this
data to the use, set the Format property of the textbox to Yes/No or True/False. This will
cause it to display as you want and leave the value as -1 or 0 so that you can use it
later.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top