A
AKA Sparkticus
I a trying to do a search in a form from a drop down list but also want to
have a wildcard search so I cant type in some of the title....
I have got the search working but can not get the wild card to work...
any idea what I need to add to to code
Private Sub Find_Records_Click()
Dim findByNameSQL As String
If IsNull(Me.criteria) Then
MsgBox "Please enter customer forename to search", , "Kitchen Database"
Me.criteria.SetFocus
Exit Sub
End If
****** this code works for a basic search but not sure it is quite right
******************
------what will i need to change to get it to work as a wild card seach
rathger tghen a full text search--------
findByNameSQL = "SELECT * FROM contractors WHERE Contractors_Comp_Name LIKE
"
findByNameSQL = findByNameSQL + "'" + Me.criteria + "'"
Me.RecordSource = findByNameSQL
If Contractors_Comp_Name.Text = "" Then
MsgBox "No records matching the criteria", vbExclamation, " Database -
Contractor Search"
End If
End Sub
many Thanx
have a wildcard search so I cant type in some of the title....
I have got the search working but can not get the wild card to work...
any idea what I need to add to to code
Private Sub Find_Records_Click()
Dim findByNameSQL As String
If IsNull(Me.criteria) Then
MsgBox "Please enter customer forename to search", , "Kitchen Database"
Me.criteria.SetFocus
Exit Sub
End If
****** this code works for a basic search but not sure it is quite right
******************
------what will i need to change to get it to work as a wild card seach
rathger tghen a full text search--------
findByNameSQL = "SELECT * FROM contractors WHERE Contractors_Comp_Name LIKE
"
findByNameSQL = findByNameSQL + "'" + Me.criteria + "'"
Me.RecordSource = findByNameSQL
If Contractors_Comp_Name.Text = "" Then
MsgBox "No records matching the criteria", vbExclamation, " Database -
Contractor Search"
End If
End Sub
many Thanx