vba boolean field format? 
Author Message
 vba boolean field format?

When returning the value of a boolean type field from a recordset object in
vba, why is the value automatically formatted as True/False? Or is
True/False just the default format for any boolean datatype perhaps?

My recordset in VBA is based on a query that is returning a Yes/No formatted
field... but when I examine the value of the field in the recordset using
the debug window it returns the value "False" where as the same record in
the query in datasheet view shows "No". I find that somewhat confusing and
wanted to know if there was a reason for this discrepancy.

ps. I know I can force the format to Yes/No in vba using the Format function
if I need to.

Thanks for any info!

- Michael



Sun, 11 Dec 2005 05:06:15 GMT  
 vba boolean field format?
You are correct, True/False is the default.

--
Wayne Morgan
Microsoft Access MVP


Quote:
> When returning the value of a boolean type field from a recordset object in
> vba, why is the value automatically formatted as True/False? Or is
> True/False just the default format for any boolean datatype perhaps?

> My recordset in vba is based on a query that is returning a Yes/No formatted
> field... but when I examine the value of the field in the recordset using
> the debug window it returns the value "False" where as the same record in
> the query in datasheet view shows "No". I find that somewhat confusing and
> wanted to know if there was a reason for this discrepancy.

> ps. I know I can force the format to Yes/No in vba using the Format function
> if I need to.

> Thanks for any info!

> - Michael



Sun, 11 Dec 2005 11:40:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Formatting boolean fields

2. Help on making a table Boolean field into a Check Box using VBA

3. Setting the Field format from VBA

4. Referencing Field Properties InputMask and Format, using VB/VBA

5. Format Date field in query using VBA

6. VBA - Format problem inserting high numeric value into text field in excel

7. CHARFORMAT and field formatting in Word2000 VBA

8. Format Boolean to Yes/No

9. Formatting Datagrid Column for Boolean Values

10. Datagrid and Bit to Boolean Formatting

11. How to format output of boolean values

12. Formatting Boolean Values in DataGrid

 

 
Powered by phpBB® Forum Software