Order by in a subform

AnnaFoot

Registered User.
Local time
Today, 23:58
Joined
Dec 5, 2000
Messages
51
I have a subform, displaying in datasheet mode, within a form that has no record source. I can't seem to control the order in which the records are displayed in the subform. When the subform is opened alone, not within the parent form, the order by command is adhered to, but it reverts back to the order they were entered when the subform is entered in the main form. Any ideas? Thanks Anna
 
I'm not sure how you're setting the Order By property, but you should do it in the On Open event of the subform. Key in the following to the On Open event of the subform:

me.OrderBy = "[SortField]"
me.OrderByOn = True

Hope that helps.

Doug
 

Users who are viewing this thread

Back
Top Bottom