A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old March 11th, 2010, 05:31 PM posted to microsoft.public.access.forms
TekWarrior
external usenet poster
 
Posts: 10
Default How Do I display a Yes/No Field correctly in a List Box?

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?
--

Thanks,
Tek
  #2  
Old March 11th, 2010, 05:44 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default How Do I display a Yes/No Field correctly in a List Box?

"TekWarrior" wrote in message
...
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)

  #3  
Old March 11th, 2010, 07:25 PM posted to microsoft.public.access.forms
TekWarrior
external usenet poster
 
Posts: 10
Default How Do I display a Yes/No Field correctly in a List Box?

Thanks Dirk, that did it..

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

--

Thanks,
Tek


"Dirk Goldgar" wrote:

"TekWarrior" wrote in message
...
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)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.