Solved

Combo Box Blank Value Choice

Posted on 2006-06-30
4
530 Views
Last Modified: 2007-12-19
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.
0
Comment
Question by:tonydemarco
  • 2
4 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 17020261
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
 
LVL 65

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 17020265
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
 
LVL 9

Author Comment

by:tonydemarco
ID: 17020469
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
 
LVL 65

Expert Comment

by:Jim Horn
ID: 17020527
Thanks for the grade.  Good luck with your project.  -Jim

0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question