poppadoc75
Computer
- Jul 22, 2005
- 10
I have a form that uses a wildcard search, the results of the search are places in a subform. But when Input a word into the search that isn't in the table, the search comes up blank. Heres the code
Please help me with the error, thank you
Code:
Private Sub refresh_Click()
Dim x As String
If IsNull(Me.find) Then
MsgBox "Please enter search criteria.", , "Natural Catalog"
Me.find.SetFocus
Exit Sub
End If
x = "SELECT * FROM Program_Name WHERE Program_Name.Description LIKE "
x = findLibSQL + "'*" + Me.find + "*'"
Me.RecordSource = findLibSQL
If IsNull(x) = True Then
MsgBox "No records matching the criteria", vbExclamation, " Database -Library Search'"
Me.find.SetFocus
End If
End Sub