it's a 2007 property. Since I never asked what version you were using, I
wasn't sure (and I don't have 2003 installed, so I couldn't go back and
refresh my memory).
If that doesn't do it, I'm not sure what to do. I'd recommend creating a
new thread (many times a thread will get ignored by more experienced users is
they see one of us is already working the problem).
In the Subject line, enter "REPOST: Sorting Records in a form"
Then recap all of the things we have tried. I'm sure I'm missing something
simple, but don't know what it might be. In your recap, you might even
reference the URL to our latest discussion, so anyone interested in lending a
hand would know where to look to see what I have recommended, and your
response.
Sorry I was not more help.
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.
Thorson said:
I don't see a "Order By On Load" property, is it under the data tab? I am
using Access 2003. If I understand it correctly, the help says it will do
this automatically:
"Use the OrderBy property to save an ordering value and apply it at a later
time. OrderBy values are saved with the objects in which they are created.
They are automatically loaded when the object is opened, but they aren't
automatically applied."
Dale Fye said:
Is the OrderByOnLoad property set to Yes?
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.
:
It is a from and there are null values. I tried both of your suggestions,
first sorting by two fields:
OrderBy:[CaseClosedDate],[CaseNumber]
and then:
OrderBy: NZ([CaseClosedDate], Date())
Neither one worked
:
We are talking about a Form, right, not a Report.
If it is a report, you will need to use the Sorting And Grouping dialog box.
This should be available in the Design section of the Ribbon (Access 2007)
or somewhere on the main toolbar if you are using 2003 or earlier.
**********
Another thought is that you might have some Null values in that
CaseClosedDate field, in which case, you might want to try:
OrderBy: NZ([CaseClosedDate], Date())
or may want to add another field to the OrderBy so that those that are Null
are sorted by some other field.
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.
:
That makes sense, I also read the help on the "Order By" property and that is
what it said, but when I put it in as:
[CaseClosedDate] Desc
It still doesn't work.
I double checked that everything is spelled correctly, I also checked and in
my main table (the table linked to the form) it is set as a date. The only
other thing I can think that would mess it up is that my form has 2 sub-forms
in it, however I did make sure and set the properties for the main form, not
either sub-form.
I am sure there is just something I am missing, any suggestions?
:
It is the name of the field, not the name of the control. So, assuming your
field name is [CaseClosedDate], your Order By line would be:
OrderBy: [CaseClosedDate]
or
OrderBy: [CaseClosedDate] Desc
If you want to include multiple fields, separate them by a comma:
OrderBy: [CaseClosedDate] Desc, [CompanyName] Asc
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.
:
Thanks for the quick reply!
What is the formatting required for the Order By property? I tried putting
in my text box name: txtCaseClosedDate, but it didn't sort any records, I
also tried putting quotes around it, but it still didn't work.
Tables, at least mine, can be sorted by one field using the "sort ascending"
or "sort Descending" buttons on the toolbar. If I save it, then every time I
open that table it is sorted the same way.
:
1. Tables don't have a sort order, unless you consider the Primary Key the
sort order.
2. Queries can have a sort order, and that is determined at the time you
create your query. You can sort by one or more fields, and in ascending or
descending order. If you open the forms properties window, and display the
data tab, you will probably see your table name in the RecordSource property.
If you click on the "..." at the right edge of that box, it will open a
query that is based on your table. Add Ascending or Descending to the sort
row, for the columns you want to sort by. Then save the query (I usually
name my queries with "qry_" appended to the front of the forms name.
3. Forms have an OrderBy property which shows up in the "data" tab. It may
be that you have one or more columns listed in that area, which would
override the sort order.
--
HTH
Dale
email address is invalid
Please reply to newsgroup only.
:
Is there a way to sort records in a form by either one field or multiple
fields? I know in tables you can sort by one field; I tried sorting the
table that is linked to the form but it didn't change the order of the
records in the form.
Thanks for the help.