I found a form in the web downloaded,
but when I search for a company get an error and highlight one line:
Here it's the code:
But the line it highlight is:
Thanks.
but when I search for a company get an error and highlight one line:
Here it's the code:
Code:
Private Sub cmdSearch_Click()
Dim LSQL As String
Dim LSearchString As String
If Len(txtSearchString) = 0 Or IsNull(txtSearchString) = True Then
MsgBox "You must enter a search string."
Else
LSearchString = txtSearchString
'Filter results based on search string
LSQL = "select * from tblVendor"
LSQL = LSQL & " where Vendor Name LIKE '*" & LSearchString & "*'"
Form_frmVendor_sub.RecordSource = LSQL
lblTitle.Caption = "Vendor Details: Filtered by '" & LSearchString & "'"
'Clear search string
txtSearchString = ""
MsgBox "Results have been filtered. All Vendor Names containing " & LSearchString & "."
End If
End Sub
But the line it highlight is:
Code:
Form_frmVendor_sub.RecordSource = LSQL
Thanks.