Results 1 to 10 of 10
  1. #1
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314

    Access desktop disables edits in a form when the form property, Order by on load, is set to a value


    Is this a bug in Access? If the Order by on Load property to a form is set to a value (field(s)), Access disables editing the form data. Remove the Order by on load value, and Access enables editing the form data. What gives? This surely, cannot be the intended functionality?

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    If the Order by on Load property to a form is set to a value (field(s)),
    The "Order by on Load" property can only be "Yes" or "No".

    In A2010, I created a form based on a table, set the "Order by" property to "Amount" and was still able to change the amounts.


    I have never used the FORM "Order by" and "Order by on Load" properties
    I prefer to have a query for the form record source. The query has the sort order set. Much better and easier, IMO....

  3. #3
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,696
    I couldn't replicate the problem in AC2016 either.

  4. #4
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314

    MS fix the problem

    I meant Order By and Order By on Load as separate properties.

    After I made the original post, I went to the associated query and did the order by in there instead of in the form and of course, it works. That doesn't take away from the fact that Access is doing a crazy thing, by disabling edits when one does the order by in the form. What is the point in even having that form property, if it is going to so severely impact functionality of the form. This issue should be escalated to some who can deal with it.

  5. #5
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    I have Access 2016, the latest update, and I can't avoid it.

  6. #6
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    705
    Does the issue happen when you order by a single field?

    Are the field(s) you are ordering by included the record source/query's output?

    It would be helpful if you posted what you have in the Order By property that causes the issue.

    Also, are you using VBA code at runtime (during execution) to set the Order By properties? If yes, it would be helpful to see the code you are using.
    Boyd Trimmell aka Hitechcoach
    Database Architect and Problem Solver
    Microsoft MVP - Access Expert
    25+ years specializing in Accounting, Inventory, and CRM systems
    "If technology doesn't work for people, then it doesn't work."

  7. #7
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,357
    I seem to recall reading that post 2007, if the field being sorted on was not updatable, the form became not updatable when sorted on that field. IIRC, a row source using Group By or Union (can't recall about DISTINCT, DISTINCT ROW or value lists) would cause the behaviour if the form was a data sheet. Not always when something like this changes is it a bug. Sometimes it's a fix. For this one, I don't profess to know which it is, but would have to figure it has something to do with the possibility that the fixed list can't be synced with the results in some cases.

    Edit: we all seem to be assuming there are no Trusted Location issues - i.e. the only thing changed was the Access version and not the pc or it's file system or the location of the db. A non trusted location will also prevent the sort.
    Last edited by Micron; 05-30-2017 at 01:58 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Quote Originally Posted by HiTechCoach View Post
    Does the issue happen when you order by a single field?
    Are the field(s) you are ordering by included the record source/query's output?
    It would be helpful if you posted what you have in the Order By property that causes the issue.
    Also, are you using VBA code at run time (during execution) to set the Order By properties? If yes, it would be helpful to see the code you are using.
    The sub-form is in sheet view mode. See attachment. The name field is from a different table. As a calculated field it cannot be be edited. The name field concatenates the given name and surname from the member table. The remainder of the sub-form is from the transaction table. There is a simple query to gather the data from the two tables.

    I originally did an order by in the form on the surname and given name, and discovered it no longer allowed any field to be edited. Thinking it may be because I ordered by a calculated field, I tried sorting on other fields from the transaction table and found the same results. It didn't seem to matter what field is used to order by in the sub-form, the result is the same.

    The transaction table, itself, has a default order by Begin Date. I have another similar transaction sub-form, which shows all transactions for a member instead of for an event. It has no calculated fields. All fields are from the source table. As I was responding to this post, I, just now, tried setting the form order by property to Activity in this form, and found I could still edit it. So it appears that the issue may only manifest itself, if the form includes a calculated field, whether the order by is on that field or not.

    I am not using VBA code. Using the query to set up the order by is a better practice anyway, given Access' odd behavior.

    Click image for larger version. 

Name:	Weekend Form.jpg 
Views:	16 
Size:	188.7 KB 
ID:	28927

  9. #9
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    There are no trusted location issues. See my reply to Hitechcoach for more details.

  10. #10
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    The issue involves having a calculated field in the form. See my reply to Hitechcoach for more details.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Form won't allow edits
    By lawdy in forum Forms
    Replies: 5
    Last Post: 03-08-2014, 03:48 PM
  2. Replies: 7
    Last Post: 01-17-2013, 07:20 PM
  3. How to LOAD access form without ribbons and toolbar?
    By taimysho0 in forum Programming
    Replies: 5
    Last Post: 07-05-2012, 07:19 AM
  4. Access 2003, sort order property of a form
    By Rick West in forum Forms
    Replies: 11
    Last Post: 09-17-2009, 08:28 PM
  5. Replies: 1
    Last Post: 06-02-2009, 04:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums