|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by Papote in Access Coding/Macros, Microsoft Access Database, Access Forms
I created a custom search on a subform where the textboxes are not enabled and locked, so it will select the record. I am having a hard time using LIKE with wildcards. If I type the full name instead of the variable it works. I want it to find what I type in whichever area of the field.
I have changed the percentage sign with asterisk and it doesn't work.
Without the wildcard, if I enter the full correct word and it does work. The problem lies in the wildcard.
I have even tried using ALike and get the same result.
I am on Access 2007, but the file format is 2000 with the back end running on SQL Server 2005.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
|
Dim strCriteria As String
Dim rst As DAO.Recordset
Dim strSearch As String
strSearch = InputBox("Search")
Set rst = Me.RecordsetClone
strCriteria = "[Word] Like '%" & strSearch & "%'"
rst.FindFirst strCriteria
Me.Bookmark = rst.Bookmark
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625