|
-
Apr 22nd, 2006, 06:02 AM
#1
Thread Starter
Member
[RESOLVED] How to change Boolean field from displaying "0" and "-1" to "Yes" and "No"
Hey there,
I have a data report, which displays a few fields from an Access table, one which is a boolean. At the moment if the boolean value is True, then on the data report it displays "-1", and if False "0".
How can I change this so it displays "Yes" if true and "No" if False?
Would be really grateful for any help.
Thanks.
-
Apr 22nd, 2006, 06:46 AM
#2
Re: How to change Boolean field from displaying "0" and "-1" to "Yes" and "No"
hey just use a small if condition that checks whether the value of record is 0 or 1 and correspondingly display as true or false
__________________
________________0îîî___
___îîî0________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
-
Apr 22nd, 2006, 06:54 AM
#3
Thread Starter
Member
Re: How to change Boolean field from displaying "0" and "-1" to "Yes" and "No"
 Originally Posted by litlewiki
hey just use a small if condition that checks whether the value of record is 0 or 1 and correspondingly display as true or false
Could you by chance post the coding, or syntax, for the smallif condition?
-
Apr 22nd, 2006, 08:18 AM
#4
Re: How to change Boolean field from displaying "0" and "-1" to "Yes" and "No"
I don't know how you display the data, using SQL statements, or bound controls...
With SQL statements, you do it like this:
Code:
SELECT IIF(my_bool_val = True, 'Yes', 'No') FROM my_table WHERE ..........etc....
-
Apr 22nd, 2006, 10:24 AM
#5
Thread Starter
Member
Re: How to change Boolean field from displaying "0" and "-1" to "Yes" and "No"
I found a solution: simply change the Format of the boolean in Properties, which allows you to state a value for True and for False.
Nevertheless, thanks Wiki and Michael
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|