×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Form not displaying data in ascending order

Form not displaying data in ascending order

Form not displaying data in ascending order

(OP)
I'm having trouble displaying the results of a combo box selection on the form in alphabetical order.

On a form that is used for updating staff information I've placed a combo box. The combo box displays names from the staff table, listing them by last name alphabetically.

When I select a name from the combo box the appropriate employee record is found, which is fine. But the record following the name I picked from the combo box is not the next record (alphabetically). Instead, it's showing whatever record is next based on Staff ID, which is the key field in the table.

Example:

StaffID   Last Name
100       Davis
101       Smith
102       Long
103       Dugan

The combo box sorts the names alphabetically, so they appear:
Davis
Dugan
Long
Smith

But after I select "Davis" from the combo box, the form displaying the records displays them in this order (by Staff ID, which is the key field):
Davis
Smith
Long
Dugan

I can't get the records to display in the detail section of the form in the same order (by last name) as they do in the combo box. Obviously the sort order on the form is based on the Staff ID number, but how can I override this?

I tried sorting my table in last-name ascending order, I tried modifying the query by removing the Staff ID column from the query. Neither worked.

If you can help I sure would appreciate it.

Kerry

RE: Form not displaying data in ascending order

(OP)
Thank you tlbroadbent! I knew it had to be something fairly simple--guess I just wasn't aware of what the Order By field did. It's working fine now.

Thanks again,
Kerry

"Failure is the opportunity to begin again more intelligently." --Henry Ford

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close