Query to Convert "Name" field to "Last Name" "First Name" "Middle Name"?
I have an example database attached.
I have many names in a table called "Personnel". The original designer simply built one field called "Name" in which the format is Last First M. As I am undertaking many new upgrades to this db, I thought it prudent to modify this to separate out the fields, so that I've now added the following fields: "Last Name" "First Name" "Middle Name".
Question 1: is splitting this up a smart idea?
Question 2: is there some simple query code I can use to populate my three new fields, based on the contents of the original "Name" field, the format of which is standardized? What is that query code I would use?
Next, I have a "Task" table with a field "LeadOld", which was just a text field with the lead person for the task. I have created a new field "LeadNew", which is a lookup to the table "Personnel".
Question 3: I would like to run another query here on table "Task" that will update "LeadNew" based on "LeadOld", and I learned how to do this before thanks to this thread: http://www.access-programmers.co.uk/forums/showthread.php?t=222485 but in this case, the items do not match exactly, because LeadOld is the entire name, and LeadNew is just the last name. So how would I modify the query suggested at that other thread for my purposes here?
Question 4: Finally, I would like, in the datasheet view of the "Tasks" table if possible, under the field "LeadNew", I would like it to show the full name if possible, not simply the last name as it does now. How do I do this?
Sorry for the many questions...
Humbly,
Derek
I have an example database attached.
I have many names in a table called "Personnel". The original designer simply built one field called "Name" in which the format is Last First M. As I am undertaking many new upgrades to this db, I thought it prudent to modify this to separate out the fields, so that I've now added the following fields: "Last Name" "First Name" "Middle Name".
Question 1: is splitting this up a smart idea?
Question 2: is there some simple query code I can use to populate my three new fields, based on the contents of the original "Name" field, the format of which is standardized? What is that query code I would use?
Next, I have a "Task" table with a field "LeadOld", which was just a text field with the lead person for the task. I have created a new field "LeadNew", which is a lookup to the table "Personnel".
Question 3: I would like to run another query here on table "Task" that will update "LeadNew" based on "LeadOld", and I learned how to do this before thanks to this thread: http://www.access-programmers.co.uk/forums/showthread.php?t=222485 but in this case, the items do not match exactly, because LeadOld is the entire name, and LeadNew is just the last name. So how would I modify the query suggested at that other thread for my purposes here?
Question 4: Finally, I would like, in the datasheet view of the "Tasks" table if possible, under the field "LeadNew", I would like it to show the full name if possible, not simply the last name as it does now. How do I do this?
Sorry for the many questions...
Humbly,
Derek