Add zeros

  • Thread starter Thread starter EllenM
  • Start date Start date
E

EllenM

Hello,
I have a field of text with values such as:
07-55
02-222
03-4444

In an empty field, using an update query, I'd like to make them 8 digits
formatted like "yy-00000, with leading zeros added after the "-", so
07-55 becomes 07-00055
02-222 becomes 02-00222
03-4444 becomes 03-04444

Is there a simple way to do this?

Thanks,
Ellen
 
New_Field_Data: Left([YourField], 3) & Right("00000" & Mid([YourField],
InStr([YourField], "-")), 5)
 
Thanks, Karl. I may have been asking for too much. I was able to do it, but
with many steps.

Ellen ;-D
 
Thanks, Karl. I may have been asking for too much.
Some numbers looked like this: "03-12045"

I was able to do it, but with many steps.

Ellen ;-D
 
Back
Top