niki
axes noob 'll b big 1 day
- Local time
- Today, 16:04
- Joined
- Apr 17, 2003
- Messages
- 66
hello,
I have a query based on a module which parses a memo field and which searches through this field for the word "Keywords:". The module code goes like this:
Public Function TheKeyWords(longText As String) As String
TheKeyWords = Mid$(longText, InStr(1, longText, "Keywords:") + 9)
End Function
My problem is that when the function doesn't find the value "Keywords:" it returns the full field.
I'd like to add a IF loop to this code which states that if "Keywords:" is not found, the function should return an empty field.
Can someone tell me how to do this?
Thank you for your help.
nico
I have a query based on a module which parses a memo field and which searches through this field for the word "Keywords:". The module code goes like this:
Public Function TheKeyWords(longText As String) As String
TheKeyWords = Mid$(longText, InStr(1, longText, "Keywords:") + 9)
End Function
My problem is that when the function doesn't find the value "Keywords:" it returns the full field.
I'd like to add a IF loop to this code which states that if "Keywords:" is not found, the function should return an empty field.
Can someone tell me how to do this?
Thank you for your help.
nico