Solved

How do I disable the sort on a Access 2010 datasheet ?

Posted on 2013-05-19
5
607 Views
Last Modified: 2013-06-08
I have a datasheet in a form.  I clicked on the ascending sort option on a field.  Now when I enter a record it immediately sorts in on that field.  I want this removed, but I cannot see where I can remove the sort.  How can I do this?
0
Comment
Question by:Braxy
5 Comments
 
LVL 7

Expert Comment

by:Beneford
ID: 39180244
The easiest way is to give it a key it can sort on.
If you have an Autonumber ID field, just transfer the sort to that.
if not, then you could create one.
Or you could create a field that automatically contains the date/time the field was entered and sort on that.

Access is SQL-based, and SQL doesn't have a concept of 'default order', and there's no guarantee that the records are actually stored in the order in which they are entered.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39181240
First see Beneford's post, the info there is essential to understanding how a table gets sorted.

<How do I disable the sort on a Access 2010 datasheet ?>
You can do this a few ways, ...here are two:

1. When you "sort" a form, you actually are setting the "Order By" property of the form.
Thus on the Open event of the form, you can clear out this property

Private Sub Form_Open(Cancel As Integer)
    Me.OrderBy = ""
End Sub


2. You can base the form on a query (not the table)
...and sort the query any way you like:

SELECT *
FROM YourTable
ORDER BY SomeField

Here you can simply make this query, then create a form with the query as the source.
Or you can enter the SQL in the form's Recordsource property directly.

JeffCoachman
0
 
LVL 75
ID: 39181936
"Access is SQL-based"
Not quite sure what you mean by that?


"and there's no guarantee that the records are actually stored in the order in which they are entered."
Actually there is. If there is no primary key, the records are 'sorted' by the order they are entered.  You can easily confirm this yourself.

mx
0
 

Accepted Solution

by:
Braxy earned 0 total points
ID: 39217748
I apologize for the delay in response.  I figured how to fix the problem.  I cleared the sort from the ribbon option
0
 

Author Closing Comment

by:Braxy
ID: 39231364
I figured out the best solution.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

778 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