Order By property ignored, form ordered by different field (1 Viewer)

Margarita

Registered User.
Local time
Today, 13:17
Joined
Aug 12, 2011
Messages
185
Hello,
I just noticed that one of my forms is not ordered by the right field. When the user scrolls through it, VendorName field should go in alphabetical order. VendorName is specified in the form's Order By Property. But for some reason the form is ordered by VendorCode instead, so when I scroll through the field VendorName, the names are not in the order I need them in. How can I fix this?
Thank you.
 

ypma

Registered User.
Local time
Today, 17:17
Joined
Apr 13, 2012
Messages
643
If you form souce is from a query ,then in the design mode of the query click the sort Ascending or Descending in the appropriate field .
 

VilaRestal

';drop database master;--
Local time
Today, 17:17
Joined
Jun 8, 2011
Messages
1,046
Check that the Order By On Load property is True. It needs to be for the Order By property to have any effect.
 

Margarita

Registered User.
Local time
Today, 13:17
Joined
Aug 12, 2011
Messages
185
If you form souce is from a query ,then in the design mode of the query click the sort Ascending or Descending in the appropriate field .


The form was created straight from the table using the wizard. Is there still any hope for me?

Thanks!
 

Margarita

Registered User.
Local time
Today, 13:17
Joined
Aug 12, 2011
Messages
185
Check that the Order By On Load property is True. It needs to be for the Order By property to have any effect.


I am working in Access 2003, so I don't have that property. Sorry- I should have mentioned that I'm working in an antique version. Is there anything comparable to Order by On Load in 2003?

Thanks!
 

VilaRestal

';drop database master;--
Local time
Today, 17:17
Joined
Jun 8, 2011
Messages
1,046
Not that antique, I don't think that's a new feature. In the form's properties window, the Data tab page, immediately beneath Order By there should be Order By On Load.

Ordering the recordset behind the form as ypma suggests is the most reliable way:

Change the form's record source (also in form properties data tab) to:

SELECT * FROM [Table1] ORDER BY [Field1]

(replace Table1 and Field1 with the correct name of the table and field you want to order by)
 

Margarita

Registered User.
Local time
Today, 13:17
Joined
Aug 12, 2011
Messages
185
Not that antique, I don't think that's a new feature. In the form's properties window, the Data tab page, immediately beneath Order By there should be Order By On Load.

Ordering the recordset behind the form as ypma suggests is the most reliable way:

Change the form's record source (also in form properties data tab) to:

SELECT * FROM [Table1] ORDER BY [Field1]

(replace Table1 and Field1 with the correct name of the table and field you want to order by)

I don't have that property, I think it was introduced in 2007. BUT- changing the recordsource as you suggested worked like a charm! Thank you!!
 

JeffAccess

Registered User.
Local time
Today, 10:17
Joined
Aug 26, 2013
Messages
21
Thanks to VilaRestal for that piece of info on "SELECT * FROM [Table1] ORDER BY [Field1]" You made it look so simple!! :)
 

Users who are viewing this thread

Top Bottom