Solved

Assign "None Selected" in combobox

Posted on 2006-07-11
3
355 Views
Last Modified: 2008-02-26
I expect this to be easy, but can't seem to figure it out.

I have a combobox that uses a query for it's recordsource.  How can I add a value to the combolist that states "None Selected."  I want this value to appear as the default when the form is opened as well as be a selection within the drop-down.  However, I do not want to physically add this as a value to the table.

The VBA will capture the logic handling based on the selection.

Thanks!
0
Comment
Question by:bkapla1
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
bluelizard earned 500 total points
ID: 17081035
in the recordsource add this with a union, e.g.,

  recordsource = select id, text from mytable union all select 99, "none selected" from mytable


--bluelizard
0
 

Author Comment

by:bkapla1
ID: 17081110
Sorry, it's been a while since I've used a Union join.... where exactly would that go... here's my exact SQL:

SELECT dbo_fk_area_codes.area_code, dbo_fk_area_codes.area_name
FROM tbl_DT_DocTrack,  dbo_fk_area_codes
WHERE tbl_DT_DocTrack.Area_Code=dbo_fk_area_codes.area_code
GROUP BY dbo_fk_area_codes.area_code, dbo_fk_area_codes.area_name
ORDER BY dbo_fk_area_codes.area_name;
0
 

Author Comment

by:bkapla1
ID: 17081197
Actually, I figured it out.

Thanks!
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now