Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Assign "None Selected" in combobox

Posted on 2006-07-11
3
Medium Priority
?
400 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
[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
3 Comments
 
LVL 14

Accepted Solution

by:
bluelizard earned 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

715 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