Table Fields Required Length

A

AZEYE

I have a table that I need to have one field always with
8 characters in it. It is a text field. I will be using
update queries to populate the field. But the data can be
anywhere from 3 characters in length to 8 characters in
length. What is updated into the field has to be right
justified with leading 0's to the left. For example if
the data inputted into the field is ABC the data in the
field should be "00000ABC" if the updated data is ABCDE
the field should be "000ABCDE".

Any ideas on how to do this?
Thanks in advance....
 
A

AZEYE

Thank you It works great....

-----Original Message-----
I think this should work for you:

Newfld:string(8-len([yourfld]),"0") & [yourfld]
-----Original Message-----
I have a table that I need to have one field always with
8 characters in it. It is a text field. I will be using
update queries to populate the field. But the data can be
anywhere from 3 characters in length to 8 characters in
length. What is updated into the field has to be right
justified with leading 0's to the left. For example if
the data inputted into the field is ABC the data in the
field should be "00000ABC" if the updated data is ABCDE
the field should be "000ABCDE".

Any ideas on how to do this?
Thanks in advance....
.
.
 

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