• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1335
  • Last Modified:

ms access 2010 + add blank value to combo box

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
dkilby
Asked:
dkilby
  • 6
  • 2
1 Solution
 
Rey Obrero (Capricorn1)Commented:


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
 
Rey Obrero (Capricorn1)Commented:
you can add a blank row by using a union query.
0
 
dkilbyAuthor Commented:
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
Technology Partners: 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!

 
Rey Obrero (Capricorn1)Commented:
you did not answer the question, the need for the blank value..
0
 
dkilbyAuthor Commented:
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
 
Rey Obrero (Capricorn1)Commented:
use a union query...
0
 
Rey Obrero (Capricorn1)Commented:
<user might have selected a value and then decided they dont want that option >

then just clear the selection made..
0
 
PJBXCommented:
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
 
Rey Obrero (Capricorn1)Commented:
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now