changing the order a form displays data

G

Guest

I created a form with a subform in my database. The main form only has three
fields: ID Number, Last Name, First name. The subform then has several
fields under it. After creating this form I created several reports,
queries, and macro's based on it and created a switchboard for the database.
I've now realized that when I created the form, I fixed it so its displaying
the entries in ascending order according to the ID number and I need it to be
in ascending order according to the persons last name so that when I go into
the form to enter new entries, the existing records are in there in
alphabetic order according to their last name. Is there a way for me to
change this without creating a whole new form and changing all my reports,
queries and switchboard?
 
F

Fred Boer

Dear jencar124:

Base your form on a query which sorts by Lastname and then by Firstname. If
you need help with how to do this, post back!

Also, your reports and queries aren't based on the *form*, but on *tables*.
Forms and reports derive their data from tables and/or queries.

HTH
 
G

Guest

Thanks Fred:

I actually figured it out (finally) after I posted this last night,
although the way you described it is not the way I did it. I closed it and
reopened while holding the shift key so that I would have access to the table
in all views and also have access to all of the queries, macros, etc. I then
went into the form and changed the view of the form to datasheet view. After
displaying it in datasheet view, I sorted it by the last name, changed it
back to form view, and saved it. I then closed the database and reopened
without holding down the shift key and the form was now displaying the
records in abc order by last name.
Was this not a permanent solution? Do I need to go ahead and create a
query like you said?
 
F

Fred Boer

Hi:

Dear jencar124:

No, that will not work properly. When you add a new record, or edit an
existing record, the changed record will not be sorted correctly, and you'd
have to go through the whole process again. Try using a query. When you use
a query, simply closing and reopening the form, or requerying the form will
display the changed records sorted as you like. Requerying can be done
easily in code as well.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top