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

Remove excess characters

Status
Not open for further replies.

MDRiddle

Technical User
Feb 4, 2005
2
US
I currently import data from a main frame into access and one of the fields has a number ranging from 1-9999 followed by 10 other charachters which includes a space. eg '123_00.00:000'. I would like to remove/delete the ten characters from the right. Does anyone have any ideas?

Thanks MDRiddle
 
You could try this:
Code:
left(strVariable, len(strVariable) - 10)
 
Thank you it worked... I also found another way too by trial and error. (Val(strVariable))/100. In the original question I used an under score to represent a space so by using Val iI got a number with two extra 0s. So dividing by 100 would get the same results.

Thanks again for your support.

Mike
 
oh, well, I didn't know that! In that case you could also use the split command
Code:
arString = split(strVariable, " ")

strNumber = arString(0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top