Sort Subform Descending Problem

  • Thread starter LeslieJ via AccessMonster.com
  • Start date
L

LeslieJ via AccessMonster.com

Hi!

I have read through many posts, and none of the suggestions have worked on my
subform. Also, I did not actually build this database, so I don't know all
of it's quirks.

I have a subform that has a [Version] - a text field (10.0, 12.0, 09, 08 for
example); [EffectiveDate] - date/time field (2009-01-22, 2009-01-09, for
example); [Status] - a combo box (Archived, Effective, In-Progress for
example).

We would like to have the form sorted so that the newest version appears as
the first record when the form is opened. I have tried OrderBy [FieldName]
DESC for each of these fields, but nothing ever seems to change how the
records are sorted.

I just realized that this subform is based on a table, is that the problem?

Thank you for all your help in advance!
LeslieJ
 
A

Access101

In form DESIGN view, open up the form properties, then click the DATA tab.


At the top is RECORD SOURCE. Click in that field and a dropdown and elipses
(3 dots) will appear.

You can click the elipses, and start the Query Builder, bringing up a query
grid that will allow you to sort the records.

Save on the way out.

Good luck.
 
L

LeslieJ via AccessMonster.com

So it is true that because the form is based on a table the sorting will not
work?
In form DESIGN view, open up the form properties, then click the DATA tab.

At the top is RECORD SOURCE. Click in that field and a dropdown and elipses
(3 dots) will appear.

You can click the elipses, and start the Query Builder, bringing up a query
grid that will allow you to sort the records.

Save on the way out.

Good luck.
[quoted text clipped - 16 lines]
Thank you for all your help in advance!
LeslieJ
 
J

John W. Vinson

Hi!

I have read through many posts, and none of the suggestions have worked on my
subform. Also, I did not actually build this database, so I don't know all
of it's quirks.

I have a subform that has a [Version] - a text field (10.0, 12.0, 09, 08 for
example); [EffectiveDate] - date/time field (2009-01-22, 2009-01-09, for
example); [Status] - a combo box (Archived, Effective, In-Progress for
example).

We would like to have the form sorted so that the newest version appears as
the first record when the form is opened. I have tried OrderBy [FieldName]
DESC for each of these fields, but nothing ever seems to change how the
records are sorted.

I just realized that this subform is based on a table, is that the problem?

Thank you for all your help in advance!
LeslieJ

A Table has no order; Access will present the records in whatever order it
finds convenient. You can use the form's Order By property (if its OrderByOn
property is set to true, which must be done in code), or - more commonly -
base the form on a sorted Query.

However - your Version field may or may not sort the way you intend. The
examples you show will sort in the order 08, 09, 10.0, 12.0 - but 7.1 will
sort after all of these, since it's sorting alphabetically (first character)
rather than numerically. if that'll be a problem post back.
 
L

LeslieJ via AccessMonster.com

I'm pretty sure that the OrderByOn property is not set.

I think I'm going to just make a query to base the subform on. I think it's
going to be easier for the end-users to understand.

Thank you so much for all your help.
[quoted text clipped - 16 lines]
Thank you for all your help in advance!
LeslieJ

A Table has no order; Access will present the records in whatever order it
finds convenient. You can use the form's Order By property (if its OrderByOn
property is set to true, which must be done in code), or - more commonly -
base the form on a sorted Query.

However - your Version field may or may not sort the way you intend. The
examples you show will sort in the order 08, 09, 10.0, 12.0 - but 7.1 will
sort after all of these, since it's sorting alphabetically (first character)
rather than numerically. if that'll be a problem post back.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top