Format Boolean to Yes/No 
Author Message
 Format Boolean to Yes/No

Hi!

What format style can you use to format boolean values to Yes/No?  I tried
the predefined numeric format but it doesn't work.  TIA

-Wes Go



Tue, 16 Aug 2005 10:14:33 GMT  
 Format Boolean to Yes/No
Try This:

Dim strBoolText As String
Dim blnValue As Boolean = False
*or*
Dim blnValue As Boolean = True

strBoolText = IIf(blnValue, "Yes", "No")

If blnValue is False, strBoolText = "No", if blnValue is True, strBoolText =
"Yes"

==============================================
Happy To Help,
Tom Spink

http://dotnetx.betasafe.com >> VB, VB.NET, C#, C++ Code

Please respond to the newsgroups, so all can benefit.

One day

Quote:
> Hi!

> What format style can you use to format boolean values to Yes/No?  I tried
> the predefined numeric format but it doesn't work.  TIA

> -Wes Go



Tue, 16 Aug 2005 16:34:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Yes/No and VBA Boolean problem

2. change yes/no boolean field to another language in datagrid

3. vba boolean field format?

4. Yes/No Field Format

5. Formatting boolean fields

6. Formatting Datagrid Column for Boolean Values

7. Datagrid and Bit to Boolean Formatting

8. How to format output of boolean values

9. Formatting Boolean Values in DataGrid

10. Yes/No Field Format

11. "Yes / Yes to All/ No / Cancel" MsgBox?

 

 
Powered by phpBB® Forum Software