Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have a "New" or "None" Entry added to a Combo Box

Status
Not open for further replies.

Kumba1

Technical User
Aug 29, 2002
94
I have a Drop-Down Combo Box that lists components on an Assembly for my Production Parts Guy, I want to be able to have the very first line on the drop-down box say something like <New> or <None>, but I cant figure out how to add that in the Query... If anyone can help, i'd appreciate it...
 
It involves a union query as the Row Source for your combo. Here's an example from an app of mine:

Code:
SELECT Units.UnitName AS Unit, Units.Description FROM Units ORDER BY Units.UnitName UNION SELECT &quot;<All>&quot;, &quot;<All>&quot; FROM Units;

Then, of course, you'll have to include code in the combo's After Update event to tell your form what to do if the user selects that entry. Remember in a union query you need the same number of fields on both sides of the union, that's why you see &quot;<All>&quot; twice in my example.

HTH...

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top