[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2009-04-02
2
Medium Priority
?
346 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
2 Comments
 
LVL 14

Accepted Solution

by:
pteranodon72 earned 2000 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

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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
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 just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

834 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