bugs in seach function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mustakbal
    New Member
    • Jul 2007
    • 25

    bugs in seach function

    I am having 2 problems with a searfch function that I am hoping you could help me with. I am using a label to trigger a search and want it not to search when the textbox is blank. So I am using this code:
    Private Sub lblSearch_Click ()

    If TxtSearch.Text = ("") Then
    MsgBox "Type a word and press search"
    Else
    Call SearchString
    End If

    End Sub
    However, the code doesn't work because the search function seems to be triggered anyways and generates an error. How could I prevent the search funtion from running when the textbox is blank.

    The second issue is when I search with a wild card, the debug.print lists several locations of strings but stops after showing the first string it finds. In other word I am not able to click again and see the next string and so on.

    Any input would be appreciated.
Working...