I have a continuous form that I would like to the result being refreshed using me.form.requery upon each character is entered in a textbox. I'm using the two textbox technique where one is invisble.
txtItemSearch is the textbox user enters for search. txtSrchItemText is the invisible textbox. This event works fine until a space is entered. I then get "You can't reference a property or method for a control unless the control has the focus" error.
Below is what I have
Code:
Private Sub txtItemSearch_Change()
Dim vSearchString As String
Me.txtItemSearch.SetFocus
vSearchString = Nz(Me.txtItemSearch.Text)
txtSrchItemText.Value = vSearchString
Me.Form.Requery
Me.txtItemSearch.SetFocus
Me.txtItemSearch.SelStart = Me.txtItemSearch.SelLength
End Sub
How do I resolve this issue?