Access - Sort Ascending in Query Design Not Working

I have been able to specify Sort Ascending on Name in queries, but the current query I am working on does not produce names alphabetically.

Is there a common reason for this?

Thank you.
exp vgAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DMTechGrooupCommented:
Can you provide the query as it is not working?
exp vgAuthor Commented:
Unfortunately, the data I am working with is sensitive and cannot be shared. If I modify or create a new sample, this may take away from the root problem.
DMTechGrooupCommented:
Not sure what to tell you.. the query should not contain any data but I will leave that up to you.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Elena QuinnCommented:
One thing is to make sure that there are no other fields in the query that are sorted.  If there are, then you want your Name field to be on the left of all the others.
IrogSintaCommented:
What was meant was for you to provide the SQL string of the query.  This will normally just contain the names of the fields and not the actual records that the query returns.  In the design view of your query, you can click the icon on the upper left and select SQL view.  This is the string you can copy and paste for us to examine.

Ron
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
The common reason is that ... text (String data) does not always sort as you night expect.
For example:

1,2,3,4,5,6,7,8,9,10,11... if Text values (Text Data Type) will sort

1
10
11
2
3
4
5
6
7
8
9

So if you have 'Names' that fall into this category, that might be the issue.
exp vgAuthor Commented:
Please find the code posted

SELECT [PS2 with EMP].Emp, [PS2 with EMP].[Loc Name], [PS2 with EMP].[Col Name], [PS2 with EMP].[Per Nbr], [PS2 with EMP].[Appt Dt], [PS2 with EMP].Event, [PS2 with EMP].[Email Addr], [PS2 with EMP].[Email Addr Comment], [PS2 with EMP].Encounter, [PS2 with EMP].Sts, 0 AS Expr1 INTO [PS3_EMP with Structure]
FROM [PS2 with EMP]
WHERE (((0)=1))
ORDER BY [PS2 with EMP].[Col Name], [PS2 with EMP].[Per Nbr];
Robert ShermanOwnerCommented:
Does this query actually produce any results?   Far as I can tell, it should not, given the "WHERE (((0)=1))" clause.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You're creating a table, so what's the point of ordering the INSERT? The order in which records are inserted into a table is irrelevant, and users should never see the raw data anyway - so it's pointless to try and do this. Just insert the records, and then use use a SELECT statement in your Form/Report, and use the ORDER BY clause there, or create a Query that includes an ORDER BY clause.

I would also advise you to do away with the spaces in your object names. You're creating a table named "
PS3_EMP with Structure". A better name would be PS3_EMP_Structure.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
exp vgAuthor Commented:
Thank you everyone - let me revisit this when I can based on the comments.
exp vgAuthor Commented:
Thank you everyone.  I am close to getting the sort working, but wanted to make sure everyone was thanked for their efforts.
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I am close to getting the sort working, but wanted to make sure everyone was thanked for their efforts.
As I said earlier, you don't sort records before you dump them into a table. You sort them AFTER you dump them to the table, when you're presenting them to the user, or when you need to work with them in an ordered fashion.
exp vgAuthor Commented:
Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.