Solved

Combo Box Blank Value Choice

Posted on 2006-06-30
4
534 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 66

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 66

Expert Comment

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

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 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