Solved

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

Posted on 2013-05-19
5
563 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

943 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now