I have a table with a yes/no field and on a form I want to search by that
field. If I set the textbox data to value and put yes, No the textbox
displays Yes or No as it should but the search fails. If I put -1, 0 as the
values, the search works as it should. Isn't there an easy way to make the
No get evaluated as 0 and so forth?
Allen Browne - 31 Dec 2005 17:41 GMT
If this is an unbound text box, set its Format property to Yes/No.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I have a table with a yes/no field and on a form I want to search by that
> field. If I set the textbox data to value and put yes, No the textbox
[quoted text clipped - 3 lines]
> the
> No get evaluated as 0 and so forth?
John Vinson - 31 Dec 2005 20:56 GMT
>I have a table with a yes/no field and on a form I want to search by that
>field. If I set the textbox data to value and put yes, No the textbox
>displays Yes or No as it should but the search fails. If I put -1, 0 as the
>values, the search works as it should. Isn't there an easy way to make the
>No get evaluated as 0 and so forth?
Several. One would be to use a Combo Box with a rowsourcetype Value
List, RowSource -1;Yes;0;No , ColumnCount 2, ColumnWidths 0,0.25.
Another would be to use an Option Group control with two buttons,
values -1 and 0, labels Yes and No.
John W. Vinson[MVP]