Assigning 1/0 to yes/no

A

Al Campagna

Cole,
Not sure why that would be necessary but...
Normally a Boolean True/False or Yes/No field yields a -1 for True and 0 for False.
Abs(YourBooleanField) would yield either1 or 0.
 
D

David F Cox

If you tell us why you are more likely to learn something.

If you are trying to add up "Yes" answers
-sum([my_yn])


% of yes answers:
- avg(my_yn)*100
 
C

colesterg

Well, I want the combo box to say yes/no so I wont confuse anyone, but I want
it to store this data numerically, not as a yes/no.

David F Cox said:
If you tell us why you are more likely to learn something.

If you are trying to add up "Yes" answers
-sum([my_yn])


% of yes answers:
- avg(my_yn)*100

Al Campagna said:
Cole,
Not sure why that would be necessary but...
Normally a Boolean True/False or Yes/No field yields a -1 for True and 0
for False.
Abs(YourBooleanField) would yield either1 or 0.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
Y

Yaacov Klapisch

the Yes/No type is (minus) -1 and 0
If you want to use a ComboBox, you can set the field as numeric and not
Yes/No and Row Source Type as Value list, Columns = 2, Bound column = 1,
Column Width = 0;5 and the Row Source = 0;"No";1;"Yes"
 
K

Klatuu

A combo box is really not the right type of control to use for this purpose.
I would suggest an Option group with two toggle buttons. Make the caption of
one button Yes and its Option Value -1. Make the other No and 0

The option group control will return the value of the selected button.
You could make True = 1, but since the Boolean data type exists soley for
binary situations, why not use it?

colesterg said:
Well, I want the combo box to say yes/no so I wont confuse anyone, but I want
it to store this data numerically, not as a yes/no.

David F Cox said:
If you tell us why you are more likely to learn something.

If you are trying to add up "Yes" answers
-sum([my_yn])


% of yes answers:
- avg(my_yn)*100

Al Campagna said:
Cole,
Not sure why that would be necessary but...
Normally a Boolean True/False or Yes/No field yields a -1 for True and 0
for False.
Abs(YourBooleanField) would yield either1 or 0.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Is there a way to assign a value of 1/0 for yes/no, respectively?
 
J

John Vinson

Well, I want the combo box to say yes/no so I wont confuse anyone, but I want
it to store this data numerically, not as a yes/no.

Use a two-column combo box, with the visible column containing "Yes"
and "No", and the bound column containing 1 and 0.

John W. Vinson[MVP]
 
C

colesterg

It worked! Thank you!

John Vinson said:
Use a two-column combo box, with the visible column containing "Yes"
and "No", and the bound column containing 1 and 0.

John W. Vinson[MVP]
 
Top