A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sorting when a form opens



 
 
Thread Tools Display Modes
  #1  
Old August 25th, 2004, 03:53 PM
Shane Nation
external usenet poster
 
Posts: n/a
Default Sorting when a form opens

Please can someone tell me how I can set a form to sort A-Z on the "Name"
filed each time it opens?

Ialso need to sort a table in the same way?

Thanks

Shane

Access 2003


  #2  
Old August 25th, 2004, 04:22 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

To have the form sort that way, create a query into the table.
In the Sorting row under your name field, choose:
Ascending.

Open your form in design view.
Open the Properties box (View menu).
Set the form's RecordSource property to the name of the query.
The form will now sort as you requested.

Do not rely on records being sorted in a particular way in the table.
Although you can set the OrderBy property for the table (Properties box, in
table design), it is better to use the query to achieve the sorting.

BTW, if you really do have a field called "Name", consider renaming it to
something else. Many things in Access have a Name property, so Access is
likely to get confused between the field called Name and the Name of the
form, for example.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Shane Nation" wrote in message
...
Please can someone tell me how I can set a form to sort A-Z on the "Name"
filed each time it opens?

Ialso need to sort a table in the same way?

Thanks

Shane

Access 2003




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange stLinkCriteria behaviour on command button Anthony Dowd Using Forms 3 August 21st, 2004 03:01 AM
Searching Records Melissa Lambino New Users 6 July 20th, 2004 04:51 AM
synchronizing form and list box Deb Smith Using Forms 8 June 21st, 2004 08:15 PM
surely a form with a ListBox can be used in a query? 1.156 Running & Setting Up Queries 14 June 2nd, 2004 04:54 PM
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM


All times are GMT +1. The time now is 07:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.