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
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