Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to: prefix or suffix 0s automatically 1

Status
Not open for further replies.

zyrag

IS-IT--Management
Dec 4, 2002
252
PH
i have a numeric field with a 6-digit fix-length and i want to automatically prefix the entry with 0s if the entry is of less than the 6-digit length. Can i make this within the table-field-column specification? say, with the "default property"? How?

I will be using vb6 as the front-end.

thanks,
 
try
in the Format type in the 000000 and see what happens

Hope this helps
Hymn
 
thanks hym... it worked for prefixing the entry with 0s but, how about suffixing 0s?
 
I am unsure what your after

Can't you just type them in i.e.
1000=001000

Hope this helps
Hymn
 
don't mind it... got it working now. I would actually want to suffix say, 99 (depending on the reason_code) on the user's entry. I tried your way (format 000099) and it also worked fine and from there i was able to do it dynamically by coding in VB.

thanks a lot,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top