Will not sort

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Forms will not sort by Order by. I have to use the select statement
including the ordering for the forms sdata source.

Thanks,
J.
 
Forms will not sort by Order by. I have to use the select statement
including the ordering for the forms sdata source.

Thanks,
J.

Not much information here to go on.
What exactly is your OrderBy code?
Did you set the Form's OrderByOn property to Yes?
 
There's no orderby on listed. I know in VBA that when using a filter the
filteron needs to be true but I am using form design, not vba.
 
There's no orderby on listed. I know in VBA that when using a filter the
filteron needs to be true but I am using form design, not vba.

You MUST set OrderByOn = True.
Two ways to do this.

1) You would do this either using code, i.e.

Me.OrderBy = [LastName], [FirstName]
Me.OrderByOn = True

or

2) by opening the form in design view and display the Form's property
sheet, Data tab.
Enter the OrderBy in the OrderBy property line, i.e. [LastName],
[FirstName]. Close and save the form change.
Then open the form in Form View. Right click on the form and select
Apply Sort/Filter. Your Form data is now sorted according to LastName,
FirstName.
You would then right-click and select Remove Filter/Sort to go back to
the original sort.
 
the other way I have been using is select table.* order by filename as the
data source for the form. From al lthis I think the best way would be to use
form_open order by
fredg said:
There's no orderby on listed. I know in VBA that when using a filter the
filteron needs to be true but I am using form design, not vba.

You MUST set OrderByOn = True.
Two ways to do this.

1) You would do this either using code, i.e.

Me.OrderBy = [LastName], [FirstName]
Me.OrderByOn = True

or

2) by opening the form in design view and display the Form's property
sheet, Data tab.
Enter the OrderBy in the OrderBy property line, i.e. [LastName],
[FirstName]. Close and save the form change.
Then open the form in Form View. Right click on the form and select
Apply Sort/Filter. Your Form data is now sorted according to LastName,
FirstName.
You would then right-click and select Remove Filter/Sort to go back to
the original sort.
 
Back
Top