Form Propery Order by

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to sort records in a form by a date field and believe I am
following the instructions: I'm typing the field name (date) into the "Order
by" line and saving the changes. When I open the property box I see the field
name in the proper spot but the records aren't sorting by date.
Thanks
Mary
 
What is your record source?
A. Table
B. Query
(the preferable answer would be (B) Query because it is more maniputable.)

if it is a query then order the query by what you desire.

if it is a table, change it to a query containing the entire table and order
it by what you desire.
--
Chris Hayes
Still a beginner (only 12 years)

[fyi, you can email me by getting rid of the British Comedian''s name who
wrote that song about "Spam"]
 
I'm trying to sort records in a form by a date field and believe I am
following the instructions: I'm typing the field name (date) into the "Order
by" line and saving the changes. When I open the property box I see the field
name in the proper spot but the records aren't sorting by date.
Thanks
Mary

In addition to entering the Order By property you must also set the
form's OrderByOn property to Yes.
You can do that by right-clicking on the form and selecting
Apply Filter/Sort

(Wouldn't it be easier if you simply click on the control you wish to
sort on and then click on the A-Z or Z-A toolbutton?)

Do you really have a field named "Date"?
Date is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html
 
Back
Top