2 Replies - 1033 Views - Last Post: 07 July 2014 - 09:09 AM Rate Topic: -----

#1 iskibidi15  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 04-June 14

Problem with my search engine

Posted 01 July 2014 - 09:38 AM

I created search engine using adodc and datagrid for my inventory system. everything goes smooth when i Search using ItemName and Category, but searching using ItemCode won't work. The error said "Filter cannot be opened."

This is the current code i am using:

Private Sub Text1_Change()
If Option1.Value = True Then
   If Text1 <> "" Then
   Adodc1.Recordset.Filter = "ItemCode like '%" & Text1 & "%'"
   Else
   Adodcstock.Refresh
   End If
ElseIf Option2.Value = True Then
   If Text1 <> "" Then
   Adodc1.Recordset.Filter = "ItemName like '%" & Text1 & "%'"
   Else
   Adodc1.Refresh
   End If
ElseIf Option3.Value = True Then
   If Text1 <> "" Then
   Adodc1.Recordset.Filter = "Category like '%" & Text1 & "%'"
   Else
   Adodc1.Refresh
   End If
End If
End Sub


Please help me, any help/suggestions will be appreciated. Thanks in advance! :)/>

This post has been edited by modi123_1: 07 July 2014 - 09:09 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Problem with my search engine

#2 iskibidi15  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 04-June 14

Re: Problem with my search engine

Posted 07 July 2014 - 08:37 AM

help please :(
Was This Post Helpful? 0
  • +
  • -

#3 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9204
  • View blog
  • Posts: 34,582
  • Joined: 12-June 08

Re: Problem with my search engine

Posted 07 July 2014 - 09:09 AM

A few things.. This really isn't a "search engine'.. just a plain old search.

Second - "using ItemCode won't work. The error said "Filter cannot be opened." " - is there anything more to this? A larger set of verbage from the error? Perhaps throw a try/catch around it and see what the exception fishes out.

Third - What sort of column data type is "ItemCode"? Some sort of numeric that wouldn't like trying to be compared to a string?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1