Modifying a Text Field

J

johnp51merlin

I have a text field that is defined as a Personell Property Number which
looks like the following: 341010000128400002. I need to insert hyphens and
periods so it looks like this 34-101-0000-1284-00.0002
 
J

John Spencer (MVP)

Use the format function

Format([Personel Property Number],"@@-@@@-@@@@-@@@@-@@.@@@@")

You MIGHT need to put a reverse slash in front of the dashes and periods. I
don't think that is the case though as long as this field is a text field.
Also, your example number is not long enough to fill all the slots. If that is
a typo, then the format above should work, if it isn't then you will have to do
some more work to get the value you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top