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

  • Thread starter Thread starter Lim Heng Sin
  • Start date Start date
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.
 
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.
 
Back
Top