Re: Yes/No and default values
From: Bruce (anonymous_at_discussions.microsoft.com)
Date: 02/24/04
- Next message: Bruce: "Re: Using "Like" on a form"
- Previous message: welsh girl: "email addresses"
- In reply to: Pavel Romashkin: "Re: Yes/No and default values"
- Next in thread: Pavel Romashkin: "Re: Yes/No and default values"
- Reply: Pavel Romashkin: "Re: Yes/No and default values"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 24 Feb 2004 04:39:20 -0800
Thank you for your replies. I have a situation where I
need to ask, for instance "Is statistical process control
used as a measure of capability?" If the user
checks "No", they have to answer (in words) "Why not?" It
could work to have just a single check box, I suppose, but
for several reasons it is better that "No" be an active
choice rather than a passive "Not Yes". This is not
entirely my decision, by the way. Also, it is likely that
N/A will be added to at least some questions, so I want to
have a structure in place to accomodate that. The
question becomes, then, how do I store N/A? As an
integer? Or what if the choices are Always, Sometimes,
and Never? Maybe I just need to use a combo box in such
cases, so that I can store the words. If the next
question offers the choices Agree, Neutral, and Disagree,
Always in one field and Agree in the next will be stored
as, say, the number 1. Queries and other data management
could become quite confusing. I would welcome suggestions
as to how I could best manage that situation. If a
limitation of check boxes, radio buttons, etc. in option
groups is that the user's choice must be stored as a
number, then I have to decide if it is the best choice.
Pardon me for going on at such length, but as my company
begins to convert to relational databases to store
information, I want to be sure to set it up as solidly as
possible from the beginning rather than going back in to
fix things later. Thanks again for taking the time to
offer your help and suggestions.
>-----Original Message-----
>I am sorry for not being clear enough.
>A built in Yes/No type field can have 3 values - "Yes" (-
1), No (Zero)
>and Null (not defined). Make sure that Null values are
Allowed in the
>table design view to get the latter, and make sure
Default value is NOT
>set to No, or 0.
>I mean, if you do not set a default value for the Yes/No
field, it will
>be Null. It is not the same as "clear", or Zero, or No.
If you bind a
>Yes/No field to a checkbox, that check box can be grayed
out (Null),
>white (No), or checked (Yes). However, using a check box
there is no way
>I know of to sett a Y/N to Null once it has been changed
from Null to
>either Y or N.
>Use of a boolean field goes far beyond checkboxes,
though. It is very
>easy to use your option group with it, and nothing stops
you from using
>code to ask questions when users choose one option or
another.
>In my opinion, what is important is that data be stored
properly. In
>other words, I will not store 23/02/2004 as "Memo" just
because it will
>fit, and "Yes" as "Text" because it is human readable.
Things like that
>will make querying the database more difficult in the
future.
>Good luck,
>Pavel
>
>Bruce wrote:
>>
>> Boolean Yes/No allows for a Yes check box (or other
>> control to choose Yes), and the absence of a check mark
>> (or other control) is No. If there is just one check
box
>> (for Yes) and the follow-up question to No (on the form)
>> is "Why not?", requiring an answer, then I was afraid it
>> would not be clear that the user is to leave the check
box
>> blank and answer the follow-up question. I suppose I
>> could have done something like "If not Yes, explain",
but
>> there is an additional problem: Not every question on
the
>> form gets answered every time the form is used. I
cannot
>> have a default check box. I need to have the option of
>> having both boxes blank. Yes/No, as I understand, does
>> not allow for a null value, or I would certainly have
used
>> that. However, Null leaves a gray check box. It works
>> OK, I think, but is confusing to inexperienced users. I
>> am designing for them. This needs to be as intuitive as
>> is posssible for the users, even if it is less so for
me.
>> I am trying to make their job easier, not mine at their
>> expense.
>> What if I were to ask the question another way: The
>> choices are Yes, No, and N/A? I realize I could get
those
>> choices from a list box or combo box so that the data
>> would be stored as text, but if I want to use an option
>> group and check boxes, the data will be stored as a
>> number. That is a default with option groups, unless I
am
>> missing something. Is there a way to store it as the
>> words "Yes", "No", or "N/A", or am I limited to the
>> numbers?>-----Original Message-----
>> >Also, Boolean defaults to 0 being no, EVERYTHING ELSE
>> >being Yes. So, 99 would still be shown as Yes.
>> >
>> >
>> >Chris
>> >
>> >
>> >>-----Original Message-----
>> >>It is not very clear to me why are you trying to do it
>> in
>> >any other way
>> >>than the built in, efficient and straightforward
>> boolean,
>> >Yes/No Access
>> >>data type.
>> >>You are trying to use other data types to define the
>> >three built-in
>> >>values of a Yes/No type - "Yes" (-1), No (Zero) and
Null
>> >(not defined).
>> >>This means that you can bypass all the code necessary
to
>> >use Text or
>> >>Long and achive the same result using built-in
features
>> >of Access.
>> >>As far as stroring Yes or No. You shouldn't try to
>> >*store* data in a
>> >>certain way. You should *format* the data in a way
you'd
>> >want.
>> >>Particularly, a Yes/No field can be easily formatted
to
>> >show Yes and No
>> >>depending on the value stored.
>> >>
>> >>Good luck,
>> >>Pavel
>> >>
>> >>Bruce wrote:
>> >>>
>> >>> I have received valuable help from Cheryl Fischer
and
>> >>> others on this general subject. A few lingering
>> >questions
>> >>> remain. Synopsis: I have a form with Yes and No
check
>> >>> boxes. In some cases checking No requires
>> >answering "Why
>> >>> not?", and in some cases neither will be checked. I
>> >want
>> >>> the check boxes to be white and blank until checked.
>> In
>> >>> the underlying table I used integer data type, no
>> >default
>> >>> value. On the form I used an option group (tied to
the
>> >>> table field) with Yes -1, No 0, default 99 (I
realize
>> it
>> >>> could have been anything other than -1 or 0, but 99
>> >>> probably won't be confused with something else). It
>> >seems
>> >>> I could have accomplished the same thing by making
the
>> >>> table field have a default value of 99. Does it
matter
>> >>> which I use?
>> >>> On a related point, I got the same results as above
>> >when I
>> >>> used text instead of integer as the data type. I
had
>> >done
>> >>> so in the hope of storing the values as Yes or No
>> rather
>> >>> than as -1 or 0, but could not get that to happen.
Is
>> >>> there a way of storing the Yes and No choices as
>> text?
>> >It
>> >>> will be easier to query, etc. in the future if I
can do
>> >>> so, and will not require remembering a number value.
>> >>> Finally, there is a report based on the form. I
want
>> >the
>> >>> same check boxes as on the form, which I can do by
>> >either
>> >>> creating an option group from scratch on the report,
>> or
>> >by
>> >>> copying one from the form to the report. Copying is
>> >>> easier, or course, but is there a better way?
>> >>.
>> >>
>> >.
>> >
>.
>
- Next message: Bruce: "Re: Using "Like" on a form"
- Previous message: welsh girl: "email addresses"
- In reply to: Pavel Romashkin: "Re: Yes/No and default values"
- Next in thread: Pavel Romashkin: "Re: Yes/No and default values"
- Reply: Pavel Romashkin: "Re: Yes/No and default values"
- Messages sorted by: [ date ] [ thread ]