Resort a table after update

  • Thread starter Thread starter bhrosey via AccessMonster.com
  • Start date Start date
B

bhrosey via AccessMonster.com

Hi everyone. I have a table called LstEmp that has a list of all employees.
I have a combo box on a form that references this table for it's values. My
problem is this...an employee got married and when I went into the table to
change her name, I resorted the table in alphabetical order and saved it, but
when I use the combo box now, her name is changed but she's still in her
original location on the drop-down list instead of where she should be
alphabetically. How do I get her to move on the drop-down list? Thanks in
advance!!
God Bless
Bill R.
 
bhrosey said:
Hi everyone. I have a table called LstEmp that has a list of all
employees. I have a combo box on a form that references this table
for it's values. My problem is this...an employee got married and
when I went into the table to change her name, I resorted the table
in alphabetical order and saved it, but when I use the combo box now,
her name is changed but she's still in her original location on the
drop-down list instead of where she should be alphabetically. How do
I get her to move on the drop-down list? Thanks in advance!!
God Bless
Bill R.

Tables have no order. Set the RowSource of your ComboBox to a query or SQL
statement instead of just the name of the table. In the query/SQL Statement
you can specifically set the sort order to what you want.
 
Never assume that tables have a known order: they're "sacks of data", and
Access puts the data wherever it can fit it.

Instead, create a query based on the form, and sort the query appropriately.
Use the query as the RowSource for the combo box rather than the table.
 
How are you sorting the row source for the combo?
I suggest you use a query that orders by last name, first name.
 
Rick said:
Hi everyone. I have a table called LstEmp that has a list of all
employees. I have a combo box on a form that references this table
[quoted text clipped - 6 lines]
God Bless
Bill R.

Tables have no order. Set the RowSource of your ComboBox to a query or SQL
statement instead of just the name of the table. In the query/SQL Statement
you can specifically set the sort order to what you want.
Thanks for jogging my memory, that worked great. Thanks again!
 

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

Back
Top