Results 1 to 4 of 4

Thread: [RESOLVED] Checking the contents of a combobox?

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2009
    Posts
    307

    Resolved [RESOLVED] Checking the contents of a combobox?

    Can someone tell me why this code works exactley the opposite of the way I thought it should?

    Code:
    If  cbKeyWords.FindStringExact(tbAddEdit.Text) = True Then
        ' Save entry to database
     else
        MsgBox("Keyword Already Exists")
    End If
    I have a combobox (cbKeyWords). I want to make sure tbAddEdit.Text does not already exist before I save. To me I should be testing for a False result not True. But the above code, goes to the msgbox if findstringexact=false and saves the data if it's true. Am I crazy or am I missing something? Shouldn't FindStringExact return false if it's not found? thanks
    Last edited by dkahn; Aug 7th, 2009 at 06:23 PM.

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