J
Jochen
Hi,
I'm currently using a search function in my db that i found in these
newsgroups. Works perfectly. But I would like the user to be able to choose
to search for an exact string or to search for part of the data
Currently I use:
strWhere = strWhere & " AND " & "qry_Personen.Naam Like '*" & Me.Naam & "*'"
So when I enter "Pete", i get every entry that has "Pete" in it, so also
"Peters" and "Peterson",....
I have added a checkbox next to the field 'Naam', When this checkbox is true
i would like the searchfunction to search the exact string so i only get
"Pete" as a result
I tried the following:
If Checkexact = False Then
If Not IsNull(Me.Naam) Then
strWhere = strWhere & " AND " & "qry_Personen.Naam Like '*" & Me.Naam &
"*'"
End If
Else
If Not IsNull(Me.Naam) Then
strWhere = strWhere & " AND " & "qry_Personen.Naam = " & Me.Naam & ""
End If
End If
Problem is that it asks me to enter a Parameter value when i try to search
What am I doing wrong?
I'm currently using a search function in my db that i found in these
newsgroups. Works perfectly. But I would like the user to be able to choose
to search for an exact string or to search for part of the data
Currently I use:
strWhere = strWhere & " AND " & "qry_Personen.Naam Like '*" & Me.Naam & "*'"
So when I enter "Pete", i get every entry that has "Pete" in it, so also
"Peters" and "Peterson",....
I have added a checkbox next to the field 'Naam', When this checkbox is true
i would like the searchfunction to search the exact string so i only get
"Pete" as a result
I tried the following:
If Checkexact = False Then
If Not IsNull(Me.Naam) Then
strWhere = strWhere & " AND " & "qry_Personen.Naam Like '*" & Me.Naam &
"*'"
End If
Else
If Not IsNull(Me.Naam) Then
strWhere = strWhere & " AND " & "qry_Personen.Naam = " & Me.Naam & ""
End If
End If
Problem is that it asks me to enter a Parameter value when i try to search
What am I doing wrong?