Checkboxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a quick question: I would like to replace yes/no fields with integer fields. On the app, how can I continue to have checkmark boxes with integers? I made an option group with a single choice, and that works. I know others have been down this road. Is that the best solution
Thanks so much. I always greatly appreciate the time others put into this forum!
 
Josh

"Is that the best solution?" ... You've described "how" you are trying to
solve a problem ("replace ... with ..."), but not what problem you are
trying to solve.

More info, please...
 
Sorry. To be more specific: When I check a checkbox on a form, I would like to enter an integer value (such as 1) in an integer field, rather than have it attached to a yes/no field. Is that do-able?
 
Josh

I still don't understand how entering an integer, or a boolean, or a text
value will help you solve a problem. It seems like you are still specifying
"how", not describing the underlying business need.

--
Good luck

Jeff Boyce
<Access MVP>

By the way, a yes/no field stores a zero for a "no", and a non-zero for a
"yes" -- I'm being ambiguous because the exact value depends on which
back-end database you use. Access uses a -1, but SQL Server uses a 1.
 
Jeff: thanks for being tenacious.
I have a SQL server 2k backend with Access 2002 frontend. I am trying to eliminate all bit fields in the backend and change them to tinyint. I need values for unknown, true and false.

When I make the change, my frontend checkboxes don't work any more. I'd still like to be able to check a box and have that record a 1 in the table. Am I out of luck with Access?
Josh
 
Josh

Just on a practical note, if I look at your form and see an unchecked
checkbox, does that mean the value is "false", or "unknown"?

And one more time -- what (not how) are you trying to do? Why does your
"checkbox" need to record "unknown"? (if it isn't proprietary info)
 
Right now there is no default value on the checkbox, so it comes up with a gray background.

But basically, this is medical information and it's important to know whether the answer is yes, no, or unknown. No and unknown are very different. I've wavered back and forth in using a bit field or integer field for this type of info. I settled on integer since I really need three choices. It's just that I like the convenience of the checkbox and I don't want the user to have to enter a bunch of zeros or ones in a little box.
Thanks for sticking it out until I finally answered your question (I hope).
Josh M
 
Josh

So, to paraphrase (let me know if I don't get it right), the user will need
to indicate that, for example, a blood test has been performed ("yes"), has
not ("no"), or will indicate "I don't know". This may be a poor example,
because I'm not sure that "no" or "unknown" tells me anything, where "yes"
does (and may have an associated date, results, etc.).

I've pushed so hard on trying to understand what underlying information you
feel must have a yes/no/unknown response set because I'm having trouble
imagining one, and I tend to the concrete side.

A bit-type will not give you the "unknown" feature you're seeking, via a
checkbox, as you've found out. Perhaps you wish to consider a combo box,
with three choices (yes, no, unknown)?
 
Thanks, Jeff, for your persistence. It does give me the answer which is: a checkbox won't work in this situation. Combobox is probably best.
Appreciate your time.
Josh
 
Back
Top