Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help with the order of my forms!

Status
Not open for further replies.
Jul 29, 2003
7
0
0
US
Ok, I'm quite sure that this is a pretty simple question and I should know better than to post it, but here goes....the order of my table is in ascending order based on a field called "Control Number". However, when I open the forms, they are not in the same order as the table (basically, record #25 should be the 25th form, etc...). How do I make it so that my forms follow the order of my table whenever I change the way it is sorted? I appreciate any help and consideration. Thanks!
 
I've had this problem before and I simply made a query that listed the data in ascending or descending order. I then based the form on that query.
There may be a simpler way though.
B.
 
thanks billmsacces, i really appreciate your input. Actually I did find a way to do it and it seems a bit simpler. All you do is open a form, highlight the field that you want to order your forms with, and click either the "ascending" or "descending" buttons on the toolbar. It seems so easy now......I appreciate it!
 
billmsacces' idea is really right on the money. Almost all professional developers agree that a form should not be based on a table, but rather based on a query which is based on the table. Then you can do all kinds of manipulation to the data when the form opens, like sorting it.

Sure, you can click on the appropriate field, then click to sort it. The whole idea, however, of developing a database (or any programming for that matter) is to make the entry, retrieval and manipulation of data AS EASY AS POSSIBLE for the end user. The fewer steps the user has to take, the better the program.

The Missinglinq

"It's got to be the going,
not the getting there that's good!"
-Harry Chapin
 
I have a form based on a query, and it sorts by the status of a project. Sometimes a user will use A->Z button to sort by date. The next time the database is opened, it will still sort by date. How do I prevent that?

FCiL
 
I solved my problem. Maybe not the most elegant way, but it works.

'On Open' on my form I run this macro:
GoToControl = Status
RunCommand = SortAscending
GoToControl = '1st control'

FCiL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top