TeresePamela
Programmer
I have been working from the searchdb.mdb that I "found" on this forum and can't find again to give multiple stars - it's a Gem.
I have modified it to suit my needs and it's perfect, but I would like one more enhancement that I don't know how to do. The current SQL retrieves if the user input is anywhere in the field. I'd like to add a checkbox so the user can request that only those records where the input is at the start of the field are retrieved, I would not know how many characters were entered. I was going to do an If-Then-Else based on the value of the checkbox. If the user wants the data from anywhere in the field the code is:
strwhere = "WHERE"
If Not IsNull(Me.descript) Then
strwhere = strwhere & " (GIData.Descript) Like '*" & _
Me.txtdescript & "*' AND"
strorder = "ORDER BY GIData.Descript;"
End If
My question is: What is the SQL to retrieve only if the input is at the start of the field?
As always, any and all input is appreciated.
Pam
I have modified it to suit my needs and it's perfect, but I would like one more enhancement that I don't know how to do. The current SQL retrieves if the user input is anywhere in the field. I'd like to add a checkbox so the user can request that only those records where the input is at the start of the field are retrieved, I would not know how many characters were entered. I was going to do an If-Then-Else based on the value of the checkbox. If the user wants the data from anywhere in the field the code is:
strwhere = "WHERE"
If Not IsNull(Me.descript) Then
strwhere = strwhere & " (GIData.Descript) Like '*" & _
Me.txtdescript & "*' AND"
strorder = "ORDER BY GIData.Descript;"
End If
My question is: What is the SQL to retrieve only if the input is at the start of the field?
As always, any and all input is appreciated.
Pam