I'm trying to pull some information out of a huge memo field. I can find the start of the data I need by using Instr(...) and searching for a specific word that is always there. I'm having trouble finding the end of the data that I want, though. The data that I'm trying to pull out varies in length, but there is always a new line character after the data. Here's what I'm trying to do:
temp = InStr(start_of_my_data, memo_field, vbCrLf)
Mid(memo_field, start_of_my_data, temp - start_of_data)
For some reason, the InStr call always returns 0. I tried using vbLf instead, but that just finds the very end of the field. I also tried vbCr, but that returns a 0, too. Does anyone know why this is? Or, does anyone know an alternate way of finding the new line character position? Any help would be greatly appreciated!
Kevin
temp = InStr(start_of_my_data, memo_field, vbCrLf)
Mid(memo_field, start_of_my_data, temp - start_of_data)
For some reason, the InStr call always returns 0. I tried using vbLf instead, but that just finds the very end of the field. I also tried vbCr, but that returns a 0, too. Does anyone know why this is? Or, does anyone know an alternate way of finding the new line character position? Any help would be greatly appreciated!
Kevin