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

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.
0
Mohammad Alsolaiman
Asked:
Mohammad Alsolaiman
  • 4
  • 4
  • 2
1 Solution
 
Ess KayEntrapenuerCommented:
add ALL first, then add the rest of the names
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
 
Ess KayEntrapenuerCommented:
the alternative would be changing (incrementing) the index of every item, then adding ALL as index(0)
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Try this

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

UNION SELECT 0, "ALL" FROM  [qryMaintenanceBalance_SpecificTech]
ORDER BY 2;
0
 
Mohammad Alsolaimanapplication programmerAuthor Commented:
wonderful
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
:-)

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 MVP, Access and Data Platform)Commented:
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

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

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