Combo box

  • Thread starter Thread starter Jones
  • Start date Start date
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
 
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.
 
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?
 
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.
 
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.
 
Back
Top