Hi
I tried searching through this Microsoft access forum but couldn’t find exactly what I was looking for.
What I need to do is parse out a number based on whether or not the 6th through the 8th characters are zeros or not. This is a ten-digit number. However the last (10th digit place could be a letter.) In addition, the third character is always a zero and it needs to be removed every time. I want to remove the unnecessary zeros and insert a dash. I will use this field to link to another table. Right now, I am thinking that it might be easiest to create a new field in a new table with this newly parsed out field. See the example below:
In the field,
if this number is 1204500090 then give me 1245-90
If the number is 1204500890 then give me 1245-257
If the number is 1204507890 then give me 1245-7890
If the number is 1204567890 then give me 1245-67890
What would the code look like for this?
I tried searching through this Microsoft access forum but couldn’t find exactly what I was looking for.
What I need to do is parse out a number based on whether or not the 6th through the 8th characters are zeros or not. This is a ten-digit number. However the last (10th digit place could be a letter.) In addition, the third character is always a zero and it needs to be removed every time. I want to remove the unnecessary zeros and insert a dash. I will use this field to link to another table. Right now, I am thinking that it might be easiest to create a new field in a new table with this newly parsed out field. See the example below:
In the field,
if this number is 1204500090 then give me 1245-90
If the number is 1204500890 then give me 1245-257
If the number is 1204507890 then give me 1245-7890
If the number is 1204567890 then give me 1245-67890
What would the code look like for this?