Hi,
I have a form (frmSearch) based on a table (tblBooks) that displays the Title and Author (in text boxes) of books in a library.
I have added a command button 'Search Title' with the following code attached to the Click event:
Private Sub cmdSearchTitle -Click()
Dim frm As Form
Dim strMsg As String
Dim strInput As String
Dim strFilter As String
Set frm = Forms!frmSearch
strMsg = "Enter search criteria."
strInput = InputBox(strMsg)
strFilter = BuildCriteria("Title", dbText, strInput)
frm.Filter = strFilter
frm.FilterOn = True
End Sub
This is what happens when I click the button:
The Input box appears with the propt "Enter search criteria". I then type in a search term and click ok. Then another box appears with the title "Enter parameter value". The box contains a text box to enter this value in and above this box is the the search term entered in the previous input box as well as an OK and cancel button. Whichever button is clicked the filter does not appear to have worked.
Basically, I don't know where this second box is coming from or why!!! Especially as I managed to make this work previuosly and the second box never appeared!!!
Any ideas?????
I have a form (frmSearch) based on a table (tblBooks) that displays the Title and Author (in text boxes) of books in a library.
I have added a command button 'Search Title' with the following code attached to the Click event:
Private Sub cmdSearchTitle -Click()
Dim frm As Form
Dim strMsg As String
Dim strInput As String
Dim strFilter As String
Set frm = Forms!frmSearch
strMsg = "Enter search criteria."
strInput = InputBox(strMsg)
strFilter = BuildCriteria("Title", dbText, strInput)
frm.Filter = strFilter
frm.FilterOn = True
End Sub
This is what happens when I click the button:
The Input box appears with the propt "Enter search criteria". I then type in a search term and click ok. Then another box appears with the title "Enter parameter value". The box contains a text box to enter this value in and above this box is the the search term entered in the previous input box as well as an OK and cancel button. Whichever button is clicked the filter does not appear to have worked.
Basically, I don't know where this second box is coming from or why!!! Especially as I managed to make this work previuosly and the second box never appeared!!!
Any ideas?????