Solved

Applied sort on a datasheet view form

Posted on 2014-01-30
2
1,402 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
Dale Fye 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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…
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 …

624 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