Hi, Im new to VB, but and pretty famliar with python. I have some code I need to change from python to VB, to run in an access database. Problem I am running into is I can't slice up my string as I need to.
someString = '12ABC1234512345' numberString = Mid(someString, 6) percision = Len(numberString) / 2 begginingHalf = Mid(someString, 6, percison) endHalf = Right(someString, percision)
The Mid function works exactly as I want it to...but when I try to slice my string with the right function I get run-time error 94, invalid use of null. I debug it, and it says that someString is null, in the Right function. If I run just the Mid function, it works fine. If I remove the Mid function and run just the right function, it still wont work... If I replace percision, with a numeral, 5, for instance, it WILL work...even though the debugger alleges that someString is null. Any ideas?