How Do I display a Yes/No Field correctly in a List Box?

  • Thread starter Thread starter TekWarrior
  • Start date Start date
T

TekWarrior

I have an Access 2003 project with a List Box on my form that has a Yes/No
field that I set the properties to display as Yes/No, but all that displays
on the List Box is "-1" for True/Yes and "0" for False/No.

How can I correctly display Yes/No?
 
TekWarrior said:
I have an Access 2003 project with a List Box on my form that has a Yes/No
field that I set the properties to display as Yes/No, but all that
displays
on the List Box is "-1" for True/Yes and "0" for False/No.

How can I correctly display Yes/No?


Set the list box's rowsource to a query that formats the field using the
"Yes/No" format:

SELECT Format([YourBooleanField],"Yes/No") AS YN
FROM YourTable;
 
Thanks Dirk, that did it..

Heaven forbid setting it in the GUI properties would do it =D

--

Thanks,
Tek


Dirk Goldgar said:
TekWarrior said:
I have an Access 2003 project with a List Box on my form that has a Yes/No
field that I set the properties to display as Yes/No, but all that
displays
on the List Box is "-1" for True/Yes and "0" for False/No.

How can I correctly display Yes/No?


Set the list box's rowsource to a query that formats the field using the
"Yes/No" format:

SELECT Format([YourBooleanField],"Yes/No") AS YN
FROM YourTable;


--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
Back
Top