TAXABLE -- YES / NO

K

kealaz

Hello,
I'm not sure what I'm doing wrong. When entering info in my form, for
taxable, if I put a y or a n or yes or no, none of these values are good. I
think it's expecting a number for some reason. It looks like it wants a 0 or
a -1, but I'm not sure which one of those numbers mean yes and which one
means no and how do I get it to accept yes or no as acceptable answers.
Please help.

Thank you VERY much for any and all help!!!
 
G

George

Yes, Access does store -1 for "Yes" and 0 for "No". In other databases, the
values stored are 1 (true, or yes) and 0 (false, or no). For your purposes
just remember -1 = true.



This is what is called a "boolean", which basically means "Either one or the
other". "True or False"

You need to create a control on your form that "Understands" this. A check
box, for example, would do the trick.
If you want your users to type in "Yes" or "No" in a text box, then you'll
need to add code to handle the conversion.

HTH

George



Depending on where and how you are trying to save this field, you
 
K

kealaz

I don't think I'm following you. On my form, I do have a text box, but it is
not accepting Yes or No as values. I get an error message.

Thank you for your time and consideration on this.
 
J

John W. Vinson

If you want your users to type in "Yes" or "No" in a text box, then you'll
need to add code to handle the conversion.

Or use a Combo Box, storing 0 and -1 while displaying No or Yes. The combo box
wizard should do this for you.
 
K

kealaz

Hi,
I really don't know what I'm doing wrong. In my table, the 'data type'
for TAXABLE is Yes/No. Then, on my form, when I drag TAXABLE from my field
list onto my form, it is a text box. Isn't it supposed to be a checkbox? I
know I am not understanding something about this process. Please help.

Thank you!
 
G

Gina Whipp

Kealaz,

The Data Type may be Yes/No but the Lookup tab is probably set for Text Box,
in any event, it will still only accept -1 or 0. If you want it to Y or N
then you must change the data type to Text and set the field length to 1.
Then on your form you can use a combo box with Y or N. Does that make more
sense?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
J

John W. Vinson

Hi,
I really don't know what I'm doing wrong. In my table, the 'data type'
for TAXABLE is Yes/No. Then, on my form, when I drag TAXABLE from my field
list onto my form, it is a text box. Isn't it supposed to be a checkbox? I
know I am not understanding something about this process. Please help.

Thank you!

Don't confuse data STORAGE - a Boolean field with a value of -1 for Yes, 0 for
No - with data DISPLAY. You can take your choice of several controls to bind
to a Boolean (Yes/No) field: a textbox (showing -1 or 0); a Checkbox (checked
or blank); a Combo Box; an Option Group - you pick!

If you want a checkbox, right mouseclick the textbox on your form and select
Change To from the menu, and change it to a checkbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top