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

Need to remove part of data in field

Status
Not open for further replies.

dassaf

Technical User
Oct 4, 2001
2
US

I have a an excel file that I imported into Access. The file was badly formatted and I need to remove some of the data from the second field. For example, one field looks like this:T 30042178901. In this case, I need to remove the T and the spaces just leaving the number. However, not every field I need to correct looks like this. There are different issues with this field throughout the table. I was using the replace function initially, but it dosn't always work.

I originally tried to correct this in Excel with Replace, which worked. However, when I imported the file into Access, I received a type conversion failure on this field. The field was formatted as text.

Any help would be appreciated.

 
Did you try to convert the data type for the cells in excel before sending to access?
 

Yes, I tried changing it to general but it still did not import the field. What was funny is that all of my other files with the same formatting (text)in that field imported fine. I was able to finally figure this out by using find and replace in Access, but it took a long time to do because sometimes it would work and sometimes it wouldn't. Maybe there is a trick to it? Anyway, is there a quicker way in case this happens again?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top