I'm trying to use a string that I build at run time in the middle of a IF - Then statment. I think VB is looking for a boolean return. Can I make VB see the string figuratively?
hope this helps:
string = "rs.field(nfield) = """
If string then
Printable View
I'm trying to use a string that I build at run time in the middle of a IF - Then statment. I think VB is looking for a boolean return. Can I make VB see the string figuratively?
hope this helps:
string = "rs.field(nfield) = """
If string then
you cant have more than 1 "=" character on any line. For obvious reasons.
In his case, the second "=" is enclosed in a String, so the compiler will not think of it as an operator.
Eugenious. If String Then will not work for a String. It needs to be numeric. Any non-zero value will execute the code in the If...Then statement and any Zero value will not execute the code (If it's a string then it will not execute the code either).
Since you are using a String, you should use something like this for you code.
Code:If MyString = MyOtherString Then