Order of records in form has changed!

Posted on 2004-11-23
Last Modified: 2012-06-21
I have a form, based on a table to which I have recently migrated a new set of records. At first, everything looked fine, but I recently when I opened the form at home , after working on the application in work, I noticed that the form starts at record number 25 (Record PK, Number datatype). Record number 1 is now the 119th record (according the navigation buttons). What the heck have I done? When I look a the table in datasheet view, it lists in the correct order. The only index I have in there is the PK!

Question by:JohnSaint
    LVL 2

    Accepted Solution

    Order will be in 'first entered first served' as a result the date when the record is inserted. Specificly set your order by statement in your SQL of the form or through the property palette of your form. Order by your PK or aby other column or create a new column where you specificly define the order in which to view the data.
    LVL 38

    Assisted Solution

    Try this: Place your form in design view and bring up the property sheet.  The third property down is the Order By property. Insert the field you want the form ordered by here.  The form can display data in any order that you specify.
    LVL 17

    Assisted Solution

    If you sort the data in a form, Access remembers the sort order (it asks you if you want to save changes to the form when you exit: what it it is doing is saving the "Order By" entry that puppydogbuddy mentions. That might be what you have done.
    LVL 26

    Expert Comment

    As a side note, I personally would not use the inbuilt record navigation buttons.

    Instead, remove them and let the use find their own record using a filter from a combo or other control

    Author Comment

    I had set the ORDER BY property and it wasn't working. It now seems to work. Odd. Cheers.
    Danny, I only displayed the navigation buttons for my own benefit. I have my own navigation system. I just wanted to see what Access was viewing as the first record.


    Author Comment

    The ORDER by property has been reset to blank!!!! I think I'll set this property in VBA on open.

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    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…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now