poppadoc75
Computer
- Jul 22, 2005
- 10
In Access, I have a form that uses a wildcard search but i can't seem to make it work.
Heres the code
I get a syntax at Me.Recordsource = findLibSQL
Thank you in Advance
Heres the code
Code:
Private Sub SEARCH_Click()
Dim findLibSQL As String
If IsNull(Me.SEARCH_DES) Then
MsgBox "Please enter search criteria.", , "Natural Catalog"
Me.SEARCH_DES.SetFocus
Exit Sub
End If
findLibSQL = "SELECT * FROM [PROGRAM_NAME]![Descritption] WHERE [SEARCH_DES] LIKE "
findLibSQL = findLibSQL + "*" + Me.SEARCH_DES + "*"
Me.RecordSource = findLibSQL
If Me.SEARCH_DES = "" Then
MsgBox "No records matching the criteria", vbExclamation, " Database -Library Search'"
End If
End Sub
Thank you in Advance