I have set up a student database in ms-access 2016 to track students on support to study and imported all the emails from a folder related to students into a database called emails (I still need to work out the VBA code to update this folder on opening/closing a form). When a student emails me, I can match that email easily to the main database as it is just from them. However, when an email is sent to a student, often other staff members are cc'd in to the email. I therefore need to be able to select out just the student's email name from the To column. So it may be Jo Smith; Leah Jones; Jo Davies (UG) (or any combination of that depending on if the student is the main recipient or not. The name of the student will always have (UG) at the end of the name, so can be identified.
Is there a way of selecting out just the student name (with the (UG) at the end is fine) from the string of names into a new column using an update column? The recipient names are separated by a ; (but if the student is first or last on the list obviously won't have a ' before/after their name). I need this to link it to the name so I can see emails sent to and from the student in forms, alongside their other information.
Many thanks in advance Ali


