Solved

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

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

623 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