Unanswered: Remove any letters in a column -use Update Query? VBA?
I have a column named "Material" in my table and I want to remove any letters that are found in the “Material” so that it would looks like in table 2.
I can use Edit\Replace with...Match any part of Field, but I must use a query to do the job of removing the Letters at end of the values because I want to use RunMacro to open all my other saved queries in sequence.
Is there a way to replace the letters by using standard query? Update query ? or using a VBA code ?
Would someone be nice and help me with this. Thanks a lot in advance.
Obviously more than what is required but never the less, I have taken the liberty to create three functions that will do what you require with a lot of flexability should you ever need it. You (or others) may find these functions usefull for other purposes as well:
The RemoveAlphaFromField fuction will carry out the task you require but, it will remove ALL alpha characters from the field data unless you specify in the IgnoreChars parameter any characters you basically want to ignore (leave in the data).
The other two functions, IsThereAlpha and GetRidOfAlpha are required by the RemoveAlphaFromField function but can run indepentantly on their own wherever desired.
The source code provided is well documented (to well) and therefore makes it all look large and scary. The source is actually quite small if you get rid of all the commenting. Just copy and paste it into a database code module.
The documentation within the source code makes it all self explanitory.