Boolean

ICTkirsten

Registered User.
Local time
Today, 22:14
Joined
Jan 3, 2015
Messages
137
Hello,

I have created a table with some fields one of which includes Gender..
i have made it into a combo box with the values of either male or female..
is there some sort of way of making it boolean if that makes sense?

Or is it already data typed to boolean?

Thanks:)
 
Yes/No is the boolean datatype in Access. So you could have a field called IsMale where True resolves to Male and False resolves to Female. However you can keep your drop down as it is, set the 'Limit To List' attribute and Required attribute to Yes, that way it can only be one of the 2 values you allow to be assigned.
 
In table design view you can set the field's data type to Yes/No. That will be a boolean field. If you display Jet/VBA boolean values as numbers, False is zero (0), and True is minus one (-1). If you convert numbers to Booleans, zero converts to False, almost everything else converts to True.

Hope this helps,
 
Hello,

Ive set the limit list to yes but do i really need to do the same for required attribute? because the field is part of a registration form i have created and i did not want gender to be a compulsory field to fill in :)

Thanks
 
You might have answered your own question here . . .
. . . do i really need to do the same for required attribute? because . . . i did not want gender to be a compulsory field
 
Just to be pedantic, without the Required attribute set, you have a trilean field type (M, F, Null), not boolean.
 
oh but the thing is its not a required field in my forms.. how should i go about this?
 

Users who are viewing this thread

Back
Top Bottom