Combo Box Blank Value Choice

I would like a combo box which is based on a table with no blank values, to show a blank value as one of its choices.
LVL 9
tonydemarcoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
You'll have to use as your combo box a RowSource that goes something like this...

SELECT "", " < Nothing > "
FROM YourTable
UNION SELECT SomeIDField, SomeColumn
FROM YourTable

{Assumes that first column is the id field, hidden, and the second column is the displayed column, visible}
0
 
rockiroadsCommented:
your sql that its based on, u create a row
e.g.

select top 1 '' as blankitem from sometable
union all
select field1 from sometable


for each field u select, ensure that many rows are in the other query
0
 
tonydemarcoAuthor Commented:
Jim,

SELECT "" AS servco_no
FROM dbo_service_company
UNION SELECT servco_no
FROM dbo_service_company

gives me all values in table plus a blank at the top.

Thanks!
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim

0
All Courses

From novice to tech pro — start learning today.