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 danielledunham on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove first four zeros!

Status
Not open for further replies.

arneweise77

Programmer
Joined
Apr 25, 2002
Messages
46
Location
SE
Hi!

I need to solve this problem!
When displaying a text, let´s say 0000478564, I need to remove or in some way get rid of the first 4 zeros.
Is there a function for this in access? or should I do this in my code(ASP.NET)
 
Yes, example...

MyString = mid("0000478564",5,Len("0000478564")-4)

Gary
gwinn7
A+, Network+
 
Can you really guarantee that it will ALWAYS be FOUR zeros ?


If, as I suspect, the future holds the potential prospect of a different number of zeros then use:-

strOriginal = the original string ( "0000478564" ) in your example


While InStr(strOriginal,"0") = 1
strOriginal = Right(strOriginal, Len(strOriginal) - 1 )
Wend



QED.

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top