Changing the display order on form of records in tabular display (1 Viewer)

jpl458

Well-known member
Local time
Today, 06:52
Joined
Mar 30, 2012
Messages
1,038
I have a form that is composed of text boxes that are in tabular form, and the form has data entry set to false. The form is based on a table (Master File). I am using the ACCESS supplied get first, get next...etc that are on the bottom of the form, like so
1674686573418.png
.

My problem is that I make development changes to the Master, but I can't seem to be able to change the order in which the records are displayed, one at a time, on the form. I have sorted the Master by date, oldest to newest, but it doesn't change the display order. Is there any way to change that, and would best practices be to add buttons to get first...etc?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 06:52
Joined
Aug 30, 2003
Messages
36,125
The form has an Order By property, or can be based on a query with sorting applied.
 

jpl458

Well-known member
Local time
Today, 06:52
Joined
Mar 30, 2012
Messages
1,038
The form has an Order By property, or can be based on a query with sorting applied.
The order by property works well indeed.

Thanks
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:52
Joined
Feb 19, 2002
Messages
43,275
They were conflicting with each other. Try to stick with using only one method or you'll make your head spin. Personally, I like using the query to order the recordset.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:52
Joined
Feb 19, 2002
Messages
43,275
The order by in the query was being overridden by the order by in the form.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:52
Joined
Feb 19, 2002
Messages
43,275
I have sorted the Master by date, oldest to newest, but it doesn't change the display order. Is there any way to change that, and would best practices be to add buttons to get first...etc?
Sounded like a query but I suppose the OP could have been talking about a table.
 

jpl458

Well-known member
Local time
Today, 06:52
Joined
Mar 30, 2012
Messages
1,038
They were conflicting with each other. Try to stick with using only one method or you'll make your head spin. Personally, I like using the query to order the recordset.
By using a query are you saying that you do a Make Table to get things in the proper order?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:52
Joined
Feb 19, 2002
Messages
43,275
No, the query has an order by clause. If you don't know how to write SQL, use the QBE. Add the tables, draw the join lines. Select the columns, choose which to order by. Save the query with a meaningful name - short. Then use the query as the RecordSource of the form/report

If you override the sort in the form, do not save your changes when the form closes.
 

jpl458

Well-known member
Local time
Today, 06:52
Joined
Mar 30, 2012
Messages
1,038
I OK with SQL, I didn't think about the record source. Doing it the way you describe leaves the file intact with less chance for error.

Thanks Pat
 

Users who are viewing this thread

Top Bottom