Results 1 to 3 of 3

Thread: String Manipulation

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Dubuque, IA
    Posts
    134

    Question

    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

  2. #2
    Guest
    you cant have more than 1 "=" character on any line. For obvious reasons.

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width