I need to Ltrim a group of characters from a string using as my selection, characters stored in a variable. I am doing this for multiple records in a recordset and storing the result to a field in a table.
The fields: ID (can vary in length), LinkCodeFM and FMCode
I want to save just "1C2" into a new field called FMCode, I have stored the ID into a variable mID as this changes from record to record. So I want to Ltrim what is contained in the variable "ID" & "-" from LinkCodeFM and store the result in FMCode. The catch is the ID can be 1, 2 or 3 characters long, so a simple Ltrim won't work. Can you use variable contents to a Ltrim a string? I look forward to your help...