SantasLittleHelper
Board Regular
- Joined
- Nov 25, 2016
- Messages
- 77
I have the code below linked to a text box on a Form. It searches 2 fields for the textbox value. Is there any way I can edit it so it searches for values which contain the textbox value? At the moment it is only searching or an exact match... E.g. If I search 'Test' it will not show 'Test123' in the results.
Code:
[FONT=Calibri][SIZE=3][COLOR=#000000]Private SubText142_AfterUpdate()[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Dim Fltr As String[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Fltr = "Email1 = " &Chr$(34) & Text142 & Chr$(34)[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Fltr = Fltr & " OR Email2= " & Chr$(34) & Text142 & Chr$(34)[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Me.Filter = Fltr[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Me.FilterOn = True[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Me.Requery[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]End Sub[/COLOR][/SIZE][/FONT]