View Single Post
  #9  
Old September 21st, 2009, 09:02 PM posted to microsoft.public.access.tablesdbdesign
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Need to have a field always have 13 characters & insert leadin

Hi,

For direct entry or imports, I do not believe you can do the automatic
padding of zeroes. For imports, you could run a process after the fact that
pads those fields that do not have thirteen digits. Or write your own
customized import process.

Be that as it may, my recommendation would be to go with a
numeric/decimal value that allows for up to thirteen digits and has its
format set to "0000000000000". This will work in all cases and will always
show the zeroes. The end-user does not need the thing stored as a text field
with all thirteen characters. Yeah, they may "require" it, but if they
always see of thirteen characters, why should they care about what is
underneath? When stored as a numeric value, searching will be simplified.
No need to type all thirteen digits into the search dialog or other places
that ask for an item number.

Clifford Bass

"WolfDog" wrote:

The intent is to allow the user to input their internal "item #" and have it
automatically add leading zeroes and store that value as a 13 character
string. The end user of the value requires a 13 digit number. No math will
be done...reference only. The automatic part part is where I am having
trouble.