Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Yes/No Combo Box Displays -1 and 0 instead of Yes & No

Status
Not open for further replies.

gtroiano

Technical User
Nov 7, 2001
99
0
0
US
I have a data entry form and on this form there is a combo box for Yes or No. The problem is that when the combo box get the focus it displays -1 instead of Yes and 0 instead of No. Is there any way that it will only display the words "Yes" or "No"? thanks!

post script: the combo box is based on a table.

Jerry.
 
I wouldn't advise using a combo box - use an OPTION group instead, with TOGGLE BUTTONS marked YES and NO, and bind the O/G to your yes/no field. Make sure in the O/G setup process you alter the default values to -1 for YES and 0 for NO.

Jim How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
thanks for the suggestion. if all else fails i will probably wind up doing just that. does anyone know of a way to keep the comobo box but not display the -1 and 0?

jerry.
 
Go to the Properties of your combo, and change Format to Yes/No.

:-9
 
it is already. the data entry part works fine. the only hangupis when you select the combo box a -1 or 0 appears instead of yes and no. if you click on the pulldown arrow it even displays Yes, No. any other suggestions?

jerry.
 
In the table, a YES/NO field stores a -1 or a Zero. It's only the DISPLAY Format of that guy that you change change to YES/NO, TRUE/FALSE, etc.

Since your combo box appears BOUND to the field, it will display the value in that field.

The only other way to do it would be to base the combo on a table that has two fields - a text field with YES or NO in it, and a number field that has -1 or 0 in it. Two records will be needed. Use this table as your combo source (unbinding it from the real table YES/NO field) and then updating the real table's YES/NO field via the combo box - it's an extra step, but it should allow you to display YES or NO in the C/B.

HTH

Jim How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
jim,

thanks a bunch. it worked like a charm!

jerry.
 
use queries instead of tables for your data source "combo box and also for your forms, store combo box information in the appropriate field which it should write back to the table YES/NO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top