473,395 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

What stands for not selected in a Yes/No field?

176 100+
Hi.

I want to use an Option Group control with 3 values to determine the gender of a person (M/F/Not Selected). The gender of a person is a Yes/No field. Option Group's first value is "-1" for True, "0" is for False. What should I use for not selected? (Null doesn't work)

Thanks.
Feb 18 '07 #1
7 2588
NeoPa
32,556 Expert Mod 16PB
In that case I would use 0 for not selected.
1 & 2 (or even 1 & -1) can be used for the two genders.
In a three-way CheckBox the values are Null (not selected); 0 (FALSE); -1 (TRUE);
Without the ability to use Null this cannot be a simple CheckBox like entity.
Feb 18 '07 #2
Michael R
176 100+
In that case I would use 0 for not selected.
1 & 2 (or even 1 & -1) can be used for the two genders.
In a three-way CheckBox the values are Null (not selected); 0 (FALSE); -1 (TRUE);
Without the ability to use Null this cannot be a simple CheckBox like entity.
Well, I have a boolean field for gender, and the values possible for that kind of field are true/false/unchecked, right? In what way I can set 0 for not selected and 1 & 2 for two genders as you said? Is it possible at all to use 3-value option group in order to cause the gender field to be either Yes, No, or Not selected?
Feb 19 '07 #3
Rabbit
12,516 Expert Mod 8TB
A boolean true/false or yes/no field has only 2 options. To relate it to a checkbox, Yes = True = Checked, No = False = Unchecked.
Feb 19 '07 #4
NeoPa
32,556 Expert Mod 16PB
Well, I have a boolean field for gender, and the values possible for that kind of field are true/false/unchecked, right? In what way I can set 0 for not selected and 1 & 2 for two genders as you said? Is it possible at all to use 3-value option group in order to cause the gender field to be either Yes, No, or Not selected?
It seems to me you've already tested that and found it to be impossible (post #1). That would have been the solution for you if it had been possible.
Firstly then, CheckBoxes can either be boolean fields (TRUE/FALSE) or they can be three-way (TRUE/FALSE/Unset). The idea of a boolean field with three possible settings is contradictory.
If an Option Group cannot take a Null value (Post #1) then another value must be assigned specifically in your logic.
I think your options are laid out clearly in post #2.
Feb 19 '07 #5
Rabbit
12,516 Expert Mod 8TB
In the end, you'll most likely have to change the field type of gender. You won't be able to use boolean for that field.
Feb 19 '07 #6
Michael R
176 100+
In the end, you'll most likely have to change the field type of gender. You won't be able to use boolean for that field.
Thanks folks, yeah it is contradictroray to have 3 options with boolean.
What is the difference then, between an Option Group frame that has 3 values for 3 different possible values of a string field ("M","F","N") and what NeoPa called a 3-way check box?
Feb 19 '07 #7
NeoPa
32,556 Expert Mod 16PB
Not much really.
Neither is a boolean object.
A 3-way CheckBox can have a value of Null though, which can easily be understood as a special value of unset (Visibly, it is greyed out rather than empty (white) or ticked).
Feb 19 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: smash2004 | last post by:
I want to keep selected values in select list when i click on another option...with a click on a mouse... if i have 3 options in select list and i click first option..it gets selected..if i then...
3
by: Earthling | last post by:
Any help would be appreciated to solve the following simple problem that I will describe. *** There is a form called "red chocolate form". The form has a particular subform field that has a...
4
by: acni | last post by:
I have the following peice of code to try and send an email to selected contacts in my form.The problem is this line: StrStore = DLookup("", "qrySelectEmail", "??????") This looks up the email...
5
by: John Creighton | last post by:
What does BCPL stand for is it one language or a family of languages. My bust guess it the B C Programming Languages. But that is just a short in the dark. I am also not sure what languages fall...
4
by: Woody Splawn | last post by:
What is the easiest way to do this. I have a field in a Winform where I want either and only a Y or an N (or perhaps a null). One way is to use a combobox with a drop down list. Is there...
2
by: ACF | last post by:
Hello, I’m trying to format only selected text in an RTF Memo field in Access 2007 I’m able to copy selected text in a Memo field to the Windows clipboard with following code: ...
3
by: allj | last post by:
I was using this for a multiselect frm with two listboxes on each side where I was able to update the selected field in one to place it in the other lstbox and then open the appropriate form by...
37
by: viki1967 | last post by:
Hi all. I have this simple form. I need if checkbox C_1 is selected: 1) field name="n_1" is required and accept only numbers; 2) field name="n_2" is required and accept only numbers; I...
8
by: ALTAFAD | last post by:
How to copy selected (s) textfield, which those selected through checkbox I like to copy in clipboard. Access textfield data when front of the textfield checkbox is checked if not checked it...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.