Sorting Subforms (yes I searched)

paindivine

Registered User.
Local time
Yesterday, 17:24
Joined
Dec 13, 2006
Messages
23
I did search the forums on this subject and can not figure out how to do what I want to do.

I have a form and subform setup. Basically by main form has contacts and my subform has log notes. It logs the date for every new record. It sorted fine up until yesterday when I ran an update query to change all the userIDs to UPPERCASE. Now it seems to be throwing the subforms in a random order.

I need the subform to order by Order date. Simple as that. I tried setting the property "Orderby" to Calls.Orderdate but it didn't work.

Thanks!
 
What is the recordsource behind the subform? If you use a query (instead of a table) you can just set the sort order easily enough in the QBE Grid.
 
Try creating a query that is based on your table that orders by order date.
If this works, make this query the recordset for your subform.
 
Scottyk537 said:
Try creating a query that is based on your table that orders by order date.
If this works, make this query the recordset for your subform.


Is there an easy way to switch from the table to the query? I'd rather not re-write the entire form if I don't have to.
 
If you open the subform (not in the main form, but just in design view), you can open the properties and then under recordsource (where the table will be listed) click on the elipsis (...) to the right of the place where the table name is shown and then it will say, "You've invoked the Query Builder on a Table. Do you want to create a query based on the table?" and you click YES and then just put all of the fields in, select your sorts, and then close the query and select YES when it asks, "Do you want to save the changes made to the SQL statement and update the property?" Then save changes to the form.
 

Users who are viewing this thread

Back
Top Bottom