|
-
Jul 14th, 2000, 11:48 AM
#1
Thread Starter
Addicted Member
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
-
Jul 14th, 2000, 12:13 PM
#2
you cant have more than 1 "=" character on any line. For obvious reasons.
-
Jul 14th, 2000, 12:33 PM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|