Drop down box in alphabetical order (1 Viewer)

lovelylauralin

Registered User.
Local time
Today, 10:27
Joined
Oct 4, 2006
Messages
31
I have created a form with a drop down box so that I can click on a client in the drop down box and it will pull the information from that clients record.. my question is :
Is there a way of having the clients names in the drop down box listed in alphabetical order without it changing the order in my table? My table is listed in order of project numbers not client names.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 11:27
Joined
Aug 30, 2003
Messages
36,140
Your source should be an SQL string rather than the table itself, where you can include an ORDER BY clause:

SELECT ClientName
FROM TableName
ORDER BY ClientName
 

lovelylauralin

Registered User.
Local time
Today, 10:27
Joined
Oct 4, 2006
Messages
31
I am new at Access and I am unsure of what an SQL string is.. I am going to go and try to look it up.. if you have any more information I would greatly appreciate it. :)
Thanks!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 11:27
Joined
Aug 30, 2003
Messages
36,140
It's a query. If you look at the properties of your combo, I assume in the row source it shows the table name. To the right of that (when you click in that row) are elipsis (...). Click on that and say yes when it asks if you want to build a query. It should put you in the query builder with the table already in the top section. In the "Field" row select the appropriate field, and in the "Sort" row select the appropriate order. Close it all out and you're done. The Row source will now say something similar to what I posted earlier.
 

hhzyousafi

Registered User.
Local time
Today, 22:27
Joined
Nov 18, 2013
Messages
74
Hi pbaldy,

I tried what you said and unfortunately my Combo Box is showing up empty. Can you please help me

Regards,

Zohair
 

Users who are viewing this thread

Top Bottom