2 replies
by wessir
by cynder
I was given the following code yesterday for my problem, but it keeps giving me an error:
Private Sub btnSearch_Click()
Dim strSQL As String
strSQL = "SELECT * FROM tblBugs WHERE " & "[" & Me!FieldList & "] = " & Chr(34) & Me!TextSearch & Chr(34)
Me!frmBugEntrySubform.Form.RecordSource = strSQL
End Sub
the error is:
runtime error '2001':
you canceled the previous operation.
I have a main form called frmBugEntry,
a sub form called frmBugEntrySubform, a button called btnSearch, a combobox called FieldList, a text box called TextSearch.
the combobox is a list of all the fields on my table (tblBugs), the text box is for users to type in a searchable string that may be found in the field selected through the combobox. then click the button (btnSearch) the occlick event for the button is the code above.
any ideas????
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending