Hi
I need to provide a search text box on my form that searches a query when a user enters the customers account number (which is a string field). I had used a combo box but the query ran very slowly across our network - the query has 17,000 records and is indexed.
I am new to Access and have been having some problems getting my button to work. My broken code is below - currently if you run this I get the error "You can't reference a property or method for a control unless the control has the focus".
Can someone provide me with some code that would a) work and b) run quickly?
Code:
Private Sub cmdFilter_Click()
If Not IsNull(Me.txtFindAccount.Text) Then
strWhere = strWhere & "([qry.Customers].ACCOUNT = """ & Me.txtFindAccount.Text & """) AND "
End If
End Sub
Any help would be greatly appreciated.