Solved

What governs how records in an Access 2007 "continuous" Form are ordered?

Posted on 2009-04-02
2
334 Views
Last Modified: 2013-12-05
I am developing an Access 2007 "project" (.adp) as a front-end to a SQL Server 2005 Express database.

I have an Access Form that I am displaying in "Continuous Form" mode, in which I would like the records to be listed in a particular order.

I have tried two approaches :
When I specify my ordering preferences in the Form's "Order By" property, with its "Order By On Load" property set to "Yes", it does not do it.
If instead, I declare "Me.OrderBy = xxxxxxxx" in the Form's "Form_Load" procedure in the VBA behind the Form, it does not work.

These do not work when they are done on their own, but when I have both in place the records are listed in the Form in the sequence I want.
Can anyone tell me why I am having to do both; ie fill out the Form's properties AND a bit of VBA coding?
I would have thought that one or other of these would have been sufficient on their own.

Any advice gratefully appreciated.
Thanks. Colin.
0
Comment
Question by:colinasad
[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 14

Accepted Solution

by:
pteranodon72 earned 500 total points
ID: 24055928
Colin,

I, too, have had bad luck with the OrderBy and OrderByOn properties of a form. I'd suggest that you just create a query that sorts the data as you like, and use that query as the recordsource for your form. Then clear the Form's OrderBy property, set OrderByOnLoad to no, and remove the Form_Load code.

HTH,

pT
0
 

Author Closing Comment

by:colinasad
ID: 31566009
Apologies for not closing sooner.
I think I went on to experiment with the solution then forgot to close.
Many thanks.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

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.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
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 …

696 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