Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting a subform

Status
Not open for further replies.

tseh

Programmer
Jan 13, 2000
64
CA
I have a subform that is sorted in ascending order by date. This is inherited from the table that is set to ascending order by date. When this subform is opened along with the parent, it loses its date ordering and reverts to ordering by the primary key. How can I order on a subform?
 
I think this is probably happening because you're using some primary key fields as the link between the parent and child forms. One thing I can suggest doing is using the OrderBy and OrderByOn properties of the subform in it's load event like so:
Code:
Me.OrderBy = "YourDateField ASC"
Me.OrderByOn = True
Durkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top