Convert bit feld to Yes/No

R

Ron Hinds

SQL2K backend Access 97 MDB frontend. I have a ComboBox whose Recordsource
is a SQL Passthrough Query. One of the returned fields is a Boolean value -
bit field in SQL Server. But I want it to display in the Access combo box as
either Yes or No. Currently Access displays 0 or -1. Fine for me, but my end
users don't understand it. Any ideas?
 
T

Trey Walpole

don't know Access, but can't you bind the combobox to the value but display
Yes/No?
that's what comboboxes are for, right <s>
 
J

J. M. De Moor

SELECT
col1, ...
CASE bit_col WHEN 1 THEN 'Yes' ELSE 'No' END AS yn_col
FROM ...;

I'll let Celko maul you with the evils of a Bit datatype... <g>
 
R

Ron Hinds

Trey Walpole said:
don't know Access, but can't you bind the combobox to the value but display
Yes/No?
that's what comboboxes are for, right <s>

Well I know how to do that when I'm returning only one column - but in this
case I am returning multiple columns for display and I wasn't sure how to do
it for just one of the columns... But the other poster's suggestion did the
trick so I'm not going to worry about it. ;-)
 

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