Hi, Jody.
I have a database that uses a subform and the records in the sub form will
get out of orded.
The records are retrieved from the tables in no particular order unless a
sort order is applied to the recordset. Most likely, at least one of the
users is applying a sort on one of the other columns, and then this sort
order is saved in the form. Other users who are sharing the same front end
will see this new sort order when they, too, open the form. Splitting the
database and placing a copy of the front end (forms, queries, modules, et
cetera) on each workstation linked to the back end (tables and relationships)
on the network server will eliminate the problem of users having to deal with
other people's arbitrary sort orders, and greatly reduce the risk of database
corruption from a shared database file.
Another thing you can do is create a query with the desired sort order and
use that as the Record Source for the subform. Whenever a user sorts the
records in a different sort order and saves that property, the only way to
remove it permanently is to have the user open the form in Design View and
open the Properties dialog window, then select the Data tab and delete the
"Order By" Property. Save the form and open it again in Form View and the
records will once again be sorted as the query in the form's Record Source is
sorted.
I remember that Access 97 allows one to programmatically (say, at the click
of a button or on the form Unload( ) event) remove the "Filter" and "Order
By" Properties that have been set via the GUI, but programmatically removing
these properties in Access 2003 only removes the application of the filter
and the sort order, but not the values in these form properties, so they need
to be removed manually.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are (e-mail address removed) and (e-mail address removed)
- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.