no cursor in text box!
I thought I was pretty savvy on VBA but....
I have a routine to filter a recordset that is triggered by the onChange from a textbox called 'textSearch' control event. The idea is meant to be that as the user keeps typing the recordset becomes progressively more filtered. So far so good. The recordset changes works fine. Afterwards each OnChange event I am using setfocus to move the focus back to the form (it seems to need this) and then once more on the 'textSearch' control. (I have tested by seeting a backcolor change that this control really does have the focus at this point). BUT....
!!No blinking cursor!! so the user cannot type more than one character at a time into the textbox. (The cursor only appears if you use the mouse to click inside the control - but that defeats the purpose of the coding). I have tried SetFocus, GotoControl and SelStart all with no avail. Can anyone help and tell me why the cursor is not there (and how to get it back)? Thanks. Here's the code.....
I thought I was pretty savvy on VBA but....
I have a routine to filter a recordset that is triggered by the onChange from a textbox called 'textSearch' control event. The idea is meant to be that as the user keeps typing the recordset becomes progressively more filtered. So far so good. The recordset changes works fine. Afterwards each OnChange event I am using setfocus to move the focus back to the form (it seems to need this) and then once more on the 'textSearch' control. (I have tested by seeting a backcolor change that this control really does have the focus at this point). BUT....
!!No blinking cursor!! so the user cannot type more than one character at a time into the textbox. (The cursor only appears if you use the mouse to click inside the control - but that defeats the purpose of the coding). I have tried SetFocus, GotoControl and SelStart all with no avail. Can anyone help and tell me why the cursor is not there (and how to get it back)? Thanks. Here's the code.....
Code:
Private Sub textSearch_Change()
Dim searchText As String
Dim temp As Integer
'On Error GoTo err_textSearch_Change
searchText = Me.textSearch.Text
temp = Me.textSearch.SelStart
'***now calls the executeSearch procedure***
executeSearch (searchText)
Forms![Members Details].SetFocus
Me.textSearch.SetFocus
Me.textSearch.SelStart = temp
Me.textSearch.BackColor = 10802658 ' just for testing
exit_textSearch_Change:
Exit Sub
err_textSearch_Change:
MsgBox Err.Descripture
Resume exit_textSearch_Change
End Sub