V
Van DeWald
I have a database where I need to reorder the customer id, based on an
alphabetical sort of the last name. My sample database looks like this:
Record, Customer ID, Last Name, First Name, County, ....
1, JEF1, Bobek, Rob, Jefferson, ...
2, JEF2, Johnson, Tina, Jefferson, ...
3, JEF3, Adams, Lisa, Jefferson, ...
but I need to alter the Customer ID, so that the database reads:
Record, Customer ID, Last Name, First Name, County, ....
3, JEF1, Adams, Lisa, Jefferson, ...
2, JEF2, Bobek, Rob, Jefferson, ...
1, JEF3, Johnson, Tina, Jefferson, ...
My customer ID is the first 3 characters of the County that they live in,
plus the numerical sequence number from the alphabetical sort of the last
name of all records for that county.
But, I'm finding that with Update Queries, I can't perform the update based
on a sort ascending option (as available in regular select queries). Thus,
I guess I have to use a Macro or some Visual Basic to do this? Anyone have
any ideas on how or where to begin?
Thank you,
Van
if replying via email, delete the _remove from the email address.
alphabetical sort of the last name. My sample database looks like this:
Record, Customer ID, Last Name, First Name, County, ....
1, JEF1, Bobek, Rob, Jefferson, ...
2, JEF2, Johnson, Tina, Jefferson, ...
3, JEF3, Adams, Lisa, Jefferson, ...
but I need to alter the Customer ID, so that the database reads:
Record, Customer ID, Last Name, First Name, County, ....
3, JEF1, Adams, Lisa, Jefferson, ...
2, JEF2, Bobek, Rob, Jefferson, ...
1, JEF3, Johnson, Tina, Jefferson, ...
My customer ID is the first 3 characters of the County that they live in,
plus the numerical sequence number from the alphabetical sort of the last
name of all records for that county.
But, I'm finding that with Update Queries, I can't perform the update based
on a sort ascending option (as available in regular select queries). Thus,
I guess I have to use a Macro or some Visual Basic to do this? Anyone have
any ideas on how or where to begin?
Thank you,
Van
if replying via email, delete the _remove from the email address.