Split function?

hazejean

Regular
Joined
Jul 11, 2003
Messages
68
I am using split function to check for subforms called in a text string.
The subform names are surrouned by brackets. ex [form1][form2]
I split using left bracket, then right bracket to get name.
However some text strings have no subforms. How can I test for non-existance of the left bracket.? If no brackets I want to skip call to subform.
thanks
 
You can use RegEx (Regular Expressions) or use IndexOf,Split and SubString methods of the String object.

One way to is to Split on the right bracket and if the first character of each element is not a left bracket then it wouldn't be a form. You get the idea.... if not let me know.
 
The problem I have is when there is no left or right bracket.
In that case I want to do nothing.
Need way to check split results when the split charater is absent.

Thanks.
 
will try...but when I have no brackets...for some reason it was not returning blank in elements

Thanks
 
Have you thought of using the InStr function to check for the existence of brackets first?
 
Back
Top