Solved

Applied sort on a datasheet view form

Posted on 2014-01-30
2
1,370 Views
Last Modified: 2014-01-31
If the user applies a sort to a column on a datasheet view form, can I make it default back to the sort order as defined in the form properties the next time it is opened?  It seems to remember the last sort and this is not what I want.
0
Comment
Question by:SteveL13
[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
2 Comments
 
LVL 10

Accepted Solution

by:
Gozreh earned 250 total points
ID: 39822639
On Load you should enter this
Me.OrderBy = ""
0
 
LVL 48

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 250 total points
ID: 39822934
If you allow them to open the datasheet and then save it when it closes, then it will retain the OrderBy property of the form.  As Gozreh mentions, one way to remove that is to set the OrderBy property on form load.

Another way to do it is to embed the datasheet into another form and give that form button to close it.  in the code behind that button, use:

Private Sub cmd_Close_Click()

    DoCmd.Close acForm, Me.Name, acSaveNo
   
End Sub

This will prevent the changes made to the datasheet sort order, column position, and column width from saving when the main form is closed.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

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…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
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.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

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