Solved

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

Posted on 2013-05-19
5
675 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 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