Solved

Combo Box Blank Value Choice

Posted on 2006-06-30
4
533 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

733 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