Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ORDER BY clause for Forms

Posted on 2009-05-01
6
Medium Priority
?
696 Views
Last Modified: 2013-12-12
Hi,

I created a form using the wizard and I believe it's based on one the queries I created. I can't really recall as I'm just learning access. In the query I added an ORDER BY clause and it displays properly in the proper order;however, the form does not conform with the ORDER BY clause of the query. How can I edit the form to use this ORDER BY clause?

SELECT articles.*, articleDirectory.*, clients.*, many.*, articleBody.*
FROM (clients INNER JOIN (articles INNER JOIN (articleDirectory INNER JOIN many ON articleDirectory.articleDirectoryID=many.articleDirectoryID) ON articles.articleID=many.articleID) ON clients.clientID=many.clientID) INNER JOIN articleBody ON many.articleBodyID=articleBody.articleBodyID
ORDER BY many.ID;

I find ms access does not seem to conform to the SQL standards - so many brackets and kind of confusing when one looks at the statement. Just a thought on it.
0
Comment
Question by:Victor Kimura
  • 3
  • 2
6 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 1000 total points
ID: 24285523
If your form sort order does not match the recordsource sort order, it suggests that at some point you have sorted the form data into a different sequence and then saved the form.
If you look at the form properties this should be visible in the form's Order By property.  Delete anything in that property and you should be back to the recordsource order.
0
 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 24287077
Goto your form properties
under the order by property you can define your primary sort

:)
0
 

Author Comment

by:Victor Kimura
ID: 24289009
Hi peter57,

I see the OrderBy in the Form's property. It's just blank. Is there supposed to be a drop-down menu to select different fields to sort by?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:NerdsOfTech
ID: 24289186
No. Actually all you need to do is specify the field name there
0
 
LVL 20

Assisted Solution

by:NerdsOfTech
NerdsOfTech earned 1000 total points
ID: 24289195
You can also specify the order direction as well
ContactName DESC

If you have more than one field you can seperate them by comma:
Name ASC, Amount DESC

=NerdsOfTech
0
 

Author Closing Comment

by:Victor Kimura
ID: 31577140
Thank you, peter57r. Thank you, NerdsOfTech.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses
Course of the Month21 days, 3 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question