?
Solved

ms access 2010 + add blank value to combo box

Posted on 2011-02-14
9
Medium Priority
?
1,322 Views
Last Modified: 2012-05-11
i have some combo boxes on my form that are populated from different queries, is there a way to add a blank value to the combo boxes so the default value is just a blank value.
0
Comment
Question by:dkilby
[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
  • 6
  • 2
9 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34893350


the question is, why do you need a blank default value?

if nothing is selected from the combo, you can interpret it as blank.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 34893352
you can add a blank row by using a union query.
0
 

Author Comment

by:dkilby
ID: 34893387
i have multiple drop downs, and i want the user to be able to select a blank value as the user will select the dropdowns to do other things, but they dont have to select a value in each combobox
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34893447
you did not answer the question, the need for the blank value..
0
 

Author Comment

by:dkilby
ID: 34893454
so when i check the values of the dropdown box, if it is blank i can ignore and move to the next one, a user might have selected a value and then decided they dont want that option so would select the blank option
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34893466
use a union query...
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34893470
<user might have selected a value and then decided they dont want that option >

then just clear the selection made..
0
 
LVL 6

Expert Comment

by:PJBX
ID: 34893806
look at the recordsource propert of your combobox and add a union statement. For example,
if the SQL behind the recordsource of the combobox is:

Select CustomerID, CustomerName from Customers.

Change it to:
Select 0 as CustomerID, Null as CustomerName
Union
Select CustomerID, CustomerName from Customers.
order by CustomerName
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34893858
yeah that is right, but combo boxes  does not have recordsource.
you have to place the union query in the rowsource property of the combo
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

762 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