show the word "All" at the first item in a combo box, or a list box

Hi:
Can I show the first item in a list box is the word "All" and after that display the rest of table items.
help me please.
Mohammad Alsolaimanapplication programmerAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
Try this

SELECT DISTINCT [qryMaintenanceBalance_SpecificTech].[TechID], [qryMaintenanceBalance_SpecificTech].[FullName] FROM qryMaintenanceBalance_SpecificTech

UNION SELECT 0, "ALL" FROM  [qryMaintenanceBalance_SpecificTech]
ORDER BY 2;
0
 
Ess KayEntrapenuerCommented:
add ALL first, then add the rest of the names
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Two examples:
SELECT EmpName, 2 FROM tblEmp GROUP BY EmpName
UNION SELECT "ALL", 1 FROM tblEMP
ORDER BY 2;



With additional options:

SELECT EmpName, 5 FROM tblEmp
UNION SELECT "<Add New>", 0 FROM tblEMP
UNION SELECT "-----------", 1 FROM tblEMP
UNION SELECT "<Select All>", 2 FROM tblEMP
UNION SELECT "-----------", 3 FROM tblEMP
ORDER BY 2;
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
Ess KayEntrapenuerCommented:
the alternative would be changing (incrementing) the index of every item, then adding ALL as index(0)
0
 
Mohammad Alsolaimanapplication programmerAuthor Commented:
here is my sql
"SELECT DISTINCT [qryMaintenanceBalance_SpecificTech].[TechID], [qryMaintenanceBalance_SpecificTech].[FullName] FROM qryMaintenanceBalance_SpecificTech ORDER BY [FullName]; "
could you show me how is my code will be? please
0
 
Mohammad Alsolaimanapplication programmerAuthor Commented:
wonderful
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
:-)

How is your app selling ?

mx
0
 
Mohammad Alsolaimanapplication programmerAuthor Commented:
Yeeh , actually it's go's will
It's now work in a lot of the biggest companies in K S A, even so in our royal princes palaces .
Army, schools and small companies .
I am alone . but when I join EE I feel like I had hire 3 or 4 experts to my establishment.
You helps me improve my code , so I owe you a lot.
Thank you very much , you keep asking about me. I am so appreciate it.
At last , I apologies about my english.
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Excellent ... I'm really glad to hear that.  You've done a LOT of work in this app, fixed a lot of issues, and I'm glad you are reaping the benefits!

I forget ... do you have a website ?

Take care ...

mx
0
 
Mohammad Alsolaimanapplication programmerAuthor Commented:
http://www.solaimanms.com/
actually, I have no time to manage the contents of my web site
as I mentioned before it's "one man show" effort
but most of my customers are coming from the web site.
The statistics shows that average of 15 person daily comes to my web site, but no time to return them as a customer's!
i am very glad to here that  from an expert like you
thanks a lot mx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.