Combo box

J

Jones

I have a combo box with 2 columns and set a value list.

The values are -1;Yes,0;No

In the code I check to see if the combo box was True or False. The code
didn't work. Then I realized that the columns were probably text values.

Is there any way to ensure that the columns are Long, Int, Boolean, etc.

SJones
 
B

Beetle

I assume you are using -1 and 0 because the combo box is bound to
a boolean field in a table or query, so if you want to check True or False
you should check the field, not the combo box.
 
K

Klatuu

Which column is the bound column?
Your value list shows Yes and No with no quotes, which would be meaningless.
It should be:
The values are -1;"Yes",0;"No"

But, I would wonder why you are using a combo box for a yes/no answer. If
the field the combo is bound to is a Boolean field, why not use a check box?
If it is not a Boolean field, why not?
 
D

Dale Fye

Usually, when I want to display a yes/no type value, I'll use a checkbox,
rather than a combo box. Occassionally I'll use an option group, but only if
I have enough space.
--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 
K

Klatuu

I like option groups when the True/False has some meaning that I want to
present that makes it obvious to the user, for example an Active/Inactive
Status. I also usually set the fore colors to Green and Red respectively for
visual reinforecment.
 

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